]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1743801: Item Status List Display Issues
[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 MIN(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1874                 </fields>
1875                 <links>
1876                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1881                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1883                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1884                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1885                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1886                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1887                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1888                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1889             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1890                 </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899         </class>
1900
1901         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1903                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1904                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1905                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1906                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1907                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1909                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1910                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1911                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1917                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1918             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1919                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1920                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1921             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1922                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1923                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1925                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1926             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1927             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1928             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1929                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1930                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1931                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1932                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1933                 </fields>
1934                 <links>
1935                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1938                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1939                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1941                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1942                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1943                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1944                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1945                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1946                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1947                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1948                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1949             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1950                 </links>
1951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952             <actions>
1953                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1956                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1957             </actions>
1958         </permacrud>
1959         </class>
1960
1961     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1962         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1963             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1964             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1965             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1966         </fields>
1967         <links/>
1968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1969             <actions>
1970                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <retrieve/>
1972                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1973                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1974             </actions>
1975         </permacrud>
1976     </class>
1977
1978     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1979         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1980             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1981             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1982             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1983             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1984             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1985             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1986             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1987         </fields>
1988         <links>
1989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1990         </links>
1991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1992             <actions>
1993                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <retrieve/>
1995                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1996                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1997             </actions>
1998         </permacrud>
1999     </class>
2000
2001     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2002         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2003             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2004             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2005             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2006             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2007             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2008         </fields>
2009         <links>
2010             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2011             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2012         </links>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2016                     <context link="matchpoint" field="org_unit"/>
2017                 </create>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2020                     <context link="matchpoint" field="org_unit"/>
2021                 </update>
2022                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2023                     <context link="matchpoint" field="org_unit"/>
2024                 </delete>
2025             </actions>
2026         </permacrud>
2027     </class>
2028
2029     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2030         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2031             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2032             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2033             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2034         </fields>
2035         <links>
2036             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2037             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2038         </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2042                     <context link="limit_set" field="owning_lib"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2046                     <context link="limit_set" field="owning_lib"/>
2047                 </update>
2048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2049                     <context link="limit_set" field="owning_lib"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053     </class>
2054     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2055         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2056             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2057             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2058             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2059         </fields>
2060         <links>
2061             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2062             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2063         </links>
2064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2065             <actions>
2066                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="limit_set" field="owning_lib"/>
2068                 </create>
2069                 <retrieve/>
2070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2071                     <context link="limit_set" field="owning_lib"/>
2072                 </update>
2073                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2074                     <context link="limit_set" field="owning_lib"/>
2075                 </delete>
2076             </actions>
2077         </permacrud>
2078     </class>
2079
2080     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2081         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2082             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2083             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2084             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2085             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2086         </fields>
2087         <links>
2088             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2089             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2090         </links>
2091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092             <actions>
2093                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2094                     <context link="limit_set" field="owning_lib"/>
2095                 </create>
2096                 <retrieve/>
2097                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2098                     <context link="limit_set" field="owning_lib"/>
2099                 </update>
2100                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2101                     <context link="limit_set" field="owning_lib"/>
2102                 </delete>
2103             </actions>
2104         </permacrud>
2105     </class>
2106
2107         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2109                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2111                 </fields>
2112                 <links/>
2113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2114             <actions>
2115                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <retrieve/>
2117                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2118                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2119             </actions>
2120         </permacrud>
2121         </class>
2122
2123         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2125                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2128                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2129                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2130                 </fields>
2131                 <links>
2132                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2133                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2134                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="ADMIN_SURVEY">
2139                     <context link="survey" field="owner"/>
2140                 </create>
2141                 <retrieve/>
2142                 <update permission="ADMIN_SURVEY">
2143                     <context link="survey" field="owner"/>
2144                 </update>
2145                 <delete permission="ADMIN_SURVEY">
2146                     <context link="survey" field="owner"/>
2147                 </delete>
2148             </actions>
2149         </permacrud>
2150         </class>
2151         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="">
2153                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2154                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2155                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2156                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2157                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2158                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2159                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2160                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2161                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2162                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2163                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2164                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2165                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2166                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2167                 </fields>
2168                 <links>
2169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2170                 </links>
2171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2172                         <actions>
2173                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2174                                         <context link="usr" field="home_ou" />
2175                                 </retrieve>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2180                 <fields oils_persist:primary="id" oils_persist:sequence="">
2181                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2182                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2183                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2184                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2185                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2186                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2187                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2189                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2190                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2191                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2192                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2193                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2194                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2195                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2196                 </fields>
2197                 <links>
2198                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2199                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2200                 </links>
2201         </class>
2202         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2204                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2207                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2208                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2209                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2210                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2211                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2215                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2216                 </links>
2217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218                         <actions> <!-- created magically, so no create action -->
2219                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2220                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2221                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2222                         </actions>
2223                 </permacrud>
2224         </class>
2225         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2227                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2228                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2230                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2232                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2233                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2234                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2235                 </fields>
2236                 <links>
2237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2238                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2239                 </links>
2240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2241                         <actions> <!-- created magically, so no create action -->
2242                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2243                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2244                         </actions>
2245                 </permacrud>
2246         </class>
2247         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2249                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2251                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2253                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2260                 </links>
2261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262             <actions>
2263                 <create permission="UPDATE_USER" context_field="owner">
2264                     <context link="usr" field="home_ou"/>
2265                 </create>
2266                                 <!-- note: public notes are still accessible via API -->
2267                 <retrieve permission="UPDATE_USER">
2268                     <context link="usr" field="home_ou"/>
2269                                 </retrieve>
2270                 <update permission="UPDATE_USER">
2271                     <context link="usr" field="home_ou"/>
2272                                 </update>
2273                 <delete permission="UPDATE_USER">
2274                     <context link="usr" field="home_ou"/>
2275                                 </delete>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2281                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2282                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2283                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2284                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2286                 </fields>
2287                 <links>
2288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2289                 </links>
2290         </class>
2291         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2293                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2294                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2295                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2296                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2297                 </fields>
2298                 <links>
2299                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2300                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2301                 </links>
2302         </class>
2303         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2305                         <field name="field" reporter:datatype="link"/>
2306                         <field name="id" reporter:datatype="id" />
2307                         <field name="source" reporter:datatype="link"/>
2308                         <field name="value" reporter:datatype="text"/>
2309                 </fields>
2310                 <links>
2311                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2312                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2313                 </links>
2314         </class>
2315         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2316                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2317                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2318                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2319                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2320                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2321                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2322                 </fields>
2323                 <links>
2324                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2325                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2327                 </links>
2328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2329                         <actions>
2330                                 <retrieve/>
2331                         </actions>
2332                 </permacrud>
2333         </class>
2334         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2335                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2336                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2338                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2339                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2340                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2341                 </fields>
2342                 <links>
2343                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2344                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2345                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2346                 </links>
2347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348                         <actions>
2349                                 <retrieve/>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2355                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2356                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2357                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2358                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2360                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2361                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2362                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2363                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2365                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2370                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2372                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2373                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2375                 </links>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="TRANSIT_COPY" context_field="owner">
2379                     <context link="target_copy" field="circ_lib"/>
2380                 </create>
2381                 <retrieve/>
2382                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2383                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2384             </actions>
2385         </permacrud>
2386         </class>
2387         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2389                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2390                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2391                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2393                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2394                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2395                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2396                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2397                 </fields>
2398                 <links>
2399                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2400                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2401                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2403                 </links>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="ADMIN_SURVEY">
2407                     <context link="survey" field="owner"/>
2408                 </create>
2409                 <retrieve permission="VIEW_USER">
2410                     <context link="usr" field="home_ou"/>
2411                 </retrieve>
2412                 <update permission="ADMIN_SURVEY">
2413                     <context link="survey" field="owner"/>
2414                 </update>
2415                 <delete permission="ADMIN_SURVEY">
2416                     <context link="survey" field="owner"/>
2417                 </delete>
2418             </actions>
2419         </permacrud>
2420         </class>
2421         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2423                         <field name="bucket" />
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="target_copy" reporter:datatype="link"/>
2426                         <field name="create_time" reporter:datatype="timestamp" />
2427                         <field name="pos" reporter:datatype="int" />
2428                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2429                 </fields>
2430                 <links>
2431                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2432                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2433             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2434                 </links>
2435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2436                         <actions>
2437                                 <retrieve permission="ADMIN_COPY_BUCKET">
2438                     <context link="bucket" owning_lib="owning_lib"/>
2439                 </retrieve>
2440             </actions>
2441         </permacrud>
2442         </class>
2443         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2444                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2445                         <field name="id" reporter:datatype="id" />
2446                         <field name="item" reporter:datatype="link"/>
2447                         <field name="note" reporter:datatype="text" />
2448                 </fields>
2449                 <links>
2450                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2451                 </links>
2452         </class>
2453
2454         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2455                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2456                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2457                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2458                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2459                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2460                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2461                 </fields>
2462                 <links>
2463                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2464                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2465                 </links>
2466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2467                         <actions>
2468                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2469                                 <retrieve/>
2470                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2471                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2472                         </actions>
2473                 </permacrud>
2474         </class>
2475
2476         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2478                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2479                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2480                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2481                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2482                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2483                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2484                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2485                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2486                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2487                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2488                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2489                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2490                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2491                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2492                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2493                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2494                 </fields>
2495                 <links>
2496                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2497                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2498                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2499                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2500                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2501                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2502                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2503                 </links>
2504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2505                         <actions>
2506                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2507                                 <retrieve/>
2508                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2509                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2510                         </actions>
2511                 </permacrud>
2512         </class>
2513
2514         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2516                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2517                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2518                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2519                 </fields>
2520                 <links>
2521                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2522                 </links>
2523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2524                         <actions>
2525                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2526                                 <retrieve/>
2527                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2528                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2529                         </actions>
2530                 </permacrud>
2531         </class>
2532
2533         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2535                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2536                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2537                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2541                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2542                 </links>
2543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544                         <actions>
2545                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2546                                 <retrieve/>
2547                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2548                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2549                         </actions>
2550                 </permacrud>
2551         </class>
2552
2553         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2554                 <fields oils_persist:primary="code">
2555                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2556                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2557                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2558                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2559                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2560                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2561                 </fields>
2562                 <links>
2563                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2564                 </links>
2565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2566                         <actions>
2567                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2568                                 <retrieve/>
2569                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2570                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2571                         </actions>
2572                 </permacrud>
2573         </class>
2574
2575         <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">
2576                 <fields oils_persist:primary="code">
2577                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2578                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2579                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2580                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2581                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2582                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2583                 </fields>
2584                 <links>
2585                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2586                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2587                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2588                 </links>
2589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2590                         <actions>
2591                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2592                                 <retrieve/>
2593                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2594                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2595                         </actions>
2596                 </permacrud>
2597         </class>
2598
2599     <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">
2600         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2601             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2602             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2603             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2604         </fields>
2605         <links>
2606             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2607             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2608         </links>
2609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2610             <actions>
2611                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2612                 <retrieve/>
2613                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2614                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2615             </actions>
2616         </permacrud>
2617     </class>
2618
2619         <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">
2620                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2621                         <field name="active" reporter:datatype="bool"/>
2622                         <field name="create_date" reporter:datatype="timestamp"/>
2623                         <field name="creator" />
2624                         <field name="deleted" reporter:datatype="bool"/>
2625                         <field name="edit_date" reporter:datatype="timestamp"/>
2626                         <field name="editor" />
2627                         <field name="id" reporter:datatype="id" />
2628                         <field name="last_xact_id" />
2629                         <field name="marc" />
2630                         <field name="source" />
2631                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2632                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2633                         <field name="heading" />
2634                         <field name="simple_heading" />
2635                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2636                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2637                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2638                 </fields>
2639                 <links>
2640                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2641                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2642                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2643                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2644                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2645                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2646                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2647                 </links>
2648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2649                         <actions>
2650                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2651                                 <retrieve/>
2652                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2653                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2654                         </actions>
2655                 </permacrud>
2656         </class>
2657         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2658                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2659                         <field name="char_encoding" />
2660                         <field name="id" />
2661                         <field name="record" />
2662                         <field name="record_status" />
2663                         <field name="thesaurus" />
2664                 </fields>
2665                 <links>
2666                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2667                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2668                 </links>
2669         </class>
2670         <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">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2672                         <field name="id" reporter:datatype="id" />
2673                         <field name="bib" reporter:datatype="link" />
2674                         <field name="authority" reporter:datatype="link" />
2675                 </fields>
2676                 <links>
2677                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2678                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2679                 </links>
2680         </class>
2681         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2682                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2683                         <field name="id" reporter:datatype="id" />
2684                         <field name="record" reporter:datatype="link" />
2685                         <field name="atag" reporter:datatype="link" />
2686                         <field name="value" reporter:datatype="text" />
2687                 </fields>
2688                 <links>
2689                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2690                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2691                 </links>
2692         </class>
2693
2694         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2695                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2696                         <field name="id" reporter:datatype="id" />
2697                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2698                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2699                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2700                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2701                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2702                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2703                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2704                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2705                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2706                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2707                 </fields>
2708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2709                         <actions>
2710                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2711                                 <retrieve/>
2712                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2713                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2714                         </actions>
2715                 </permacrud>
2716         </class>
2717
2718         <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">
2719                 <fields oils_persist:primary="code" oils_persist:sequence="">
2720                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2721                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2722                 </fields>
2723                 <links/>
2724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2725             <actions>
2726                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2727                 <retrieve/>
2728                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2729                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2730             </actions>
2731         </permacrud>
2732         </class>
2733         <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">
2734                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2735                         <field name="accepting_usr" />
2736                         <field name="amount" reporter:datatype="money" />
2737                         <field name="amount_collected" reporter:datatype="money" />
2738                         <field name="approval_code" reporter:datatype="text"/>
2739                         <field name="cash_drawer" reporter:datatype="link"/>
2740                         <field name="cc_number" reporter:datatype="text"/>
2741                         <field name="cc_order_number" reporter:datatype="text"/>
2742                         <field name="cc_processor" reporter:datatype="text"/>
2743                         <field name="id" reporter:datatype="id" />
2744                         <field name="note" reporter:datatype="text"/>
2745                         <field name="payment_ts" reporter:datatype="timestamp"/>
2746                         <field name="xact" reporter:datatype="link"/>
2747                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2748                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2749                 </fields>
2750                 <links>
2751                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2752                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2753                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2754                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2755                 </links>
2756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2757             <actions>
2758                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2759                     <context link="xact" jump="usr" field="home_ou"/>
2760                 </retrieve>
2761                         </actions>
2762                 </permacrud>
2763         </class>
2764         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition" oils_persist:field_safe="true">
2765                 <fields oils_persist:primary="name">
2766                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2767                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2768                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2769                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2770                 </fields>
2771                 <links/>
2772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773             <actions>
2774                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2775                 <retrieve/>
2776                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2777                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2778             </actions>
2779         </permacrud>
2780         </class>
2781
2782         <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">
2783                 <fields oils_persist:primary="alias">
2784                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2785                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2786                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2787                 </fields>
2788                 <links>
2789                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2790                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2791                 </links>
2792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2793             <actions>
2794                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2795                 <retrieve/>
2796                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2797                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2798             </actions>
2799         </permacrud>
2800         </class>
2801
2802         <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">
2803                 <fields oils_persist:primary="name">
2804                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2805                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2806                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2807                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2808                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2809                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2810                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2811                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2812                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2813                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2814                 </fields>
2815                 <links>
2816                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2817                 </links>
2818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2819             <actions>
2820                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2821                 <retrieve/>
2822                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2823                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2824             </actions>
2825         </permacrud>
2826         </class>
2827
2828         <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">
2829                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2830                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2831                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2832                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2833                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2834                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2835                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2836                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2837                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2838                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2839                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2840                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2841                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2842                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2843                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2844                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2845                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2846                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2847                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2848                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2849                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link"/>
2850                 </fields>
2851                 <links>
2852                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2853                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2854                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2855                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2856                 </links>
2857         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2858             <actions>
2859                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2860                 <retrieve/>
2861                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2862                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2863             </actions>
2864         </permacrud>
2865         </class>
2866
2867         <class id="cmfvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_virtual_map" oils_persist:tablename="config.metabib_field_virtual_map" reporter:label="Metabib Field Virtual Map" oils_persist:field_safe="true">
2868                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2869                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2870                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2871                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link"/>
2872                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2873                 </fields>
2874                 <links>
2875                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2876                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2877                 </links>
2878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2879             <actions>
2880                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2881                 <retrieve/>
2882                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2883                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2884             </actions>
2885         </permacrud>
2886         </class>
2887
2888         <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">
2889                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2890                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2891                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2892                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2893                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2894                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2895                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2896                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2897                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2898                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2899                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2900                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2901                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2902                 </fields>
2903                 <links>
2904                 </links>
2905                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2906                         <actions>
2907                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2908                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2909                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2910                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2911                         </actions>
2912                 </permacrud>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2916                         <field name="id" reporter:datatype="id" />
2917                         <field name="name" reporter:datatype="text"/>
2918                         <field name="xpath" reporter:datatype="text"/>
2919                         <field name="format" reporter:datatype="link"/>
2920                         <field name="first_word" reporter:datatype="bool" />
2921                 </fields>
2922                 <links/>
2923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2924             <actions>
2925                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2926                 <retrieve/>
2927                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2928                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2929             </actions>
2930         </permacrud>
2931         </class>
2932         <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">
2933                 <fields oils_persist:primary="code" oils_persist:sequence="">
2934                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2935                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2936                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2937                 </fields>
2938                 <links/>
2939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2940             <actions>
2941                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2942                 <retrieve/>
2943                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2944                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2945             </actions>
2946         </permacrud>
2947         </class>
2948         <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">
2949                 <fields oils_persist:primary="code" oils_persist:sequence="">
2950                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2951                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2952                 </fields>
2953                 <links/>
2954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2955             <actions>
2956                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2957                 <retrieve/>
2958                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2959                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2960             </actions>
2961         </permacrud>
2962         </class>
2963     <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">
2964         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2965             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2966             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2967             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2968             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2969         </fields>
2970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2971             <actions>
2972                 <retrieve/>
2973             </actions>
2974         </permacrud>
2975     </class>
2976         <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">
2977                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2978                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2979                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2980                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2981                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2982                 </fields>
2983                 <links>
2984                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2985                 </links>
2986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2987             <actions>
2988                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2989                 <retrieve/>
2990                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2991                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2992             </actions>
2993         </permacrud>
2994         </class>
2995         <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">
2996                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2997                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2998                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2999                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3000                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3001                 </fields>
3002                 <links>
3003                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3004                 </links>
3005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3006             <actions>
3007                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3008                 <retrieve/>
3009                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3010                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3011             </actions>
3012         </permacrud>
3013         </class>
3014         <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">
3015                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3016                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3017                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3018                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3019                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3020                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3021                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3022                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3023                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3024                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3025                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3026                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3027                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3028                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3029                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3030                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3031                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3032                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3033                 </fields>
3034                 <links>
3035                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3036                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3037                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3038                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3039                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3040                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3041                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3042                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3043                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3044                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3045                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3046                 </links>
3047         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3048             <actions>
3049                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3050                 <retrieve/>
3051                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3052                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3053             </actions>
3054         </permacrud>
3055         </class>
3056         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3057                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3058                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3059                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3060                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3061                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3062                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3063                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3064                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3065                 </fields>
3066                 <links>
3067                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3068                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3069         </links>
3070         </class>
3071         <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">
3072                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3073                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3074                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3075                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3076                 </fields>
3077                 <links>
3078                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3079                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3080                 </links>
3081         </class>
3082         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3083                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3084                         <field name="id" reporter:datatype="id" />
3085                         <field name="value" oils_persist:i18n="true" />
3086                 </fields>
3087                 <links/>
3088         </class>
3089         <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">
3090                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3091                         <field name="balance_owed" reporter:datatype="money" />
3092                         <field name="total_owed" reporter:datatype="money" />
3093                         <field name="total_paid" reporter:datatype="money" />
3094                         <field name="usr" reporter:datatype="link"/>
3095                 </fields>
3096                 <links>
3097                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3098         </links>
3099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3100             <actions>
3101                 <retrieve permission="VIEW_USER">
3102                     <context link="usr" field="home_ou"/>
3103                 </retrieve>
3104             </actions>
3105         </permacrud>
3106         </class>
3107         <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">
3108                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3109                         <field name="collector" />
3110                         <field name="enter_time" reporter:datatype="timestamp"/>
3111                         <field name="id" reporter:datatype="id" />
3112                         <field name="location" reporter:datatype="link"/>
3113                         <field name="usr" reporter:datatype="link"/>
3114                 </fields>
3115                 <links>
3116                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3117                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3118                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3119                 </links>
3120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3121             <actions>
3122                 <create permission="money.collections_tracker.create" context_field="location"/>
3123                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3124                 <delete permission="money.collections_tracker.create" context_field="location"/>
3125             </actions>
3126         </permacrud>
3127         </class>
3128         <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">
3129                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3130                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3131                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3132                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3133                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3134                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3135                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3136                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3137                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3138                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3139                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3140                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3141                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3142                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3143                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3144                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3145                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3146                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3147                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3148                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3149                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3150                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3151                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3152                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3153                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3154                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3155                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3156                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3157                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3158                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3159                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3160                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3161                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3162                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3163                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3164                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3165                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3166                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3167                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3168                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3169                 </fields>
3170                 <links>
3171                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3172                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3173                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3174                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3175                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3176                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3177                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3178                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3179                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3180                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3181                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3182                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3183                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3184                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3185                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3186                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3187                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3188                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3189                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3190                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3191                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3192                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3193                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3194                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3195                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3196                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3197                 </links>
3198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3199             <actions>
3200                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3201                 <retrieve/>
3202                 <update permission="UPDATE_MARC" global_required="true"/>
3203                 <!-- 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. -->
3204                 <delete permission="DELETE_RECORD" global_required="true"/>
3205             </actions>
3206         </permacrud>
3207         </class>
3208         <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">
3209                 <fields oils_persist:primary="id">
3210                         <field name="dow_0_close" />
3211                         <field name="dow_0_open" />
3212                         <field name="dow_1_close" />
3213                         <field name="dow_1_open" />
3214                         <field name="dow_2_close" />
3215                         <field name="dow_2_open" />
3216                         <field name="dow_3_close" />
3217                         <field name="dow_3_open" />
3218                         <field name="dow_4_close" />
3219                         <field name="dow_4_open" />
3220                         <field name="dow_5_close" />
3221                         <field name="dow_5_open" />
3222                         <field name="dow_6_close" />
3223                         <field name="dow_6_open" />
3224                         <field name="id" reporter:datatype="id" />
3225                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3226                 </fields>
3227                 <links>
3228                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3229                 </links>
3230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3231             <actions>
3232                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3233                 <retrieve/>
3234                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3235                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3236             </actions>
3237         </permacrud>
3238         </class>
3239         <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">
3240                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3241                         <field name="id" reporter:datatype="id" />
3242                         <field name="record" reporter:datatype="link"/>
3243                         <field name="label" reporter:datatype="text"/>
3244                         <field name="label_sortkey" reporter:datatype="text"/>
3245                         <field name="deleted" reporter:datatype="bool"/>
3246                 </fields>
3247                 <links>
3248                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3249                 </links>
3250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3251             <actions>
3252                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3253                 <retrieve/>
3254                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3255                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3256             </actions>
3257         </permacrud>
3258         </class>
3259         <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">
3260                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3261                         <field name="id" reporter:datatype="id" />
3262                         <field name="target_copy" reporter:datatype="link" />
3263                         <field name="part" reporter:datatype="link"/>
3264                 </fields>
3265                 <links>
3266                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3267                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3268                 </links>
3269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3270             <actions>
3271                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3272                 <retrieve/>
3273                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3274                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3275             </actions>
3276         </permacrud>
3277         </class>
3278     <class  id="aecc"
3279             controller="open-ils.cstore open-ils.pcrud"
3280             oils_obj:fieldmapper="action::emergency_closing_circulation"
3281             oils_persist:tablename="action.emergency_closing_circulation"
3282             reporter:label="Emergency Closing Circulation Entry"
3283             oils_persist:readonly="true"
3284     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3285         <fields oils_persist:primary="id">
3286             <field name="id" reporter:datatype="id" />
3287             <field name="circulation" reporter:datatype="link" />
3288                         <field name="emergency_closing" reporter:datatype="link"/>
3289             <field name="original_due_date" reporter:datatype="timestamp" />
3290             <field name="process_time" reporter:datatype="timestamp" />
3291         </fields>
3292         <links>
3293             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3294             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3295         </links>
3296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3297             <actions>
3298                 <retrieve/>
3299             </actions>
3300         </permacrud>
3301     </class>
3302     <class  id="aecr"
3303             controller="open-ils.cstore open-ils.pcrud"
3304             oils_obj:fieldmapper="action::emergency_closing_reservation"
3305             oils_persist:tablename="action.emergency_closing_reservation"
3306             reporter:label="Emergency Closing Reservation Entry"
3307             oils_persist:readonly="true"
3308     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3309         <fields oils_persist:primary="id">
3310             <field name="id" reporter:datatype="id" />
3311             <field name="reservation" reporter:datatype="link" />
3312                         <field name="emergency_closing" reporter:datatype="link"/>
3313             <field name="original_end_time" reporter:datatype="timestamp" />
3314             <field name="process_time" reporter:datatype="timestamp" />
3315         </fields>
3316         <links>
3317             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3318             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3319         </links>
3320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3321             <actions>
3322                 <retrieve/>
3323             </actions>
3324         </permacrud>
3325     </class>
3326     <class  id="aech"
3327             controller="open-ils.cstore open-ils.pcrud"
3328             oils_obj:fieldmapper="action::emergency_closing_hold"
3329             oils_persist:tablename="action.emergency_closing_hold"
3330             reporter:label="Emergency Closing Hold Entry"
3331             oils_persist:readonly="true"
3332     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3333         <fields oils_persist:primary="id">
3334             <field name="id" reporter:datatype="id" />
3335             <field name="hold" reporter:datatype="link" />
3336                         <field name="emergency_closing" reporter:datatype="link"/>
3337             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3338             <field name="process_time" reporter:datatype="timestamp" />
3339         </fields>
3340         <links>
3341             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3342             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3343         </links>
3344         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3345             <actions>
3346                 <retrieve/>
3347             </actions>
3348         </permacrud>
3349     </class>
3350     <class  id="aecs"
3351             controller="open-ils.cstore open-ils.pcrud"
3352             oils_obj:fieldmapper="action::emergency_closing_status"
3353             oils_persist:tablename="action.emergency_closing_status"
3354             reporter:label="Emergency Closing Status"
3355             oils_persist:readonly="true"
3356     >
3357         <fields oils_persist:primary="id">
3358             <field name="id" reporter:datatype="id" />
3359             <field name="creator" reporter:datatype="link" />
3360             <field name="create_time" reporter:datatype="timestamp" />
3361             <field name="process_start_time" reporter:datatype="timestamp" />
3362             <field name="process_end_time" reporter:datatype="timestamp" />
3363             <field name="last_update_time" reporter:datatype="timestamp" />
3364             <field name="circulations" reporter:datatype="int" />
3365             <field name="circulations_complete" reporter:datatype="int" />
3366             <field name="reservations" reporter:datatype="int" />
3367             <field name="reservations_complete" reporter:datatype="int" />
3368             <field name="holds" reporter:datatype="int" />
3369             <field name="holds_complete" reporter:datatype="int" />
3370         </fields>
3371         <links>
3372             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3373         </links>
3374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3375             <actions>
3376                 <retrieve/>
3377             </actions>
3378         </permacrud>
3379     </class>
3380     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3381         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3382             <field name="id" reporter:datatype="id" />
3383             <field name="creator" reporter:datatype="link" />
3384             <field name="create_time" reporter:datatype="timestamp" />
3385             <field name="process_start_time" reporter:datatype="timestamp" />
3386             <field name="process_end_time" reporter:datatype="timestamp" />
3387             <field name="last_update_time" reporter:datatype="timestamp" />
3388             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3389             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3390             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3391             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3392             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3393         </fields>
3394         <links>
3395             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3396             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3397             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3398             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3399             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3400             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3401         </links>
3402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3403             <actions>
3404                 <create permission="EMERGENCY_CLOSING">
3405                     <context link="closing" field="org_unit" />
3406                 </create>
3407                 <retrieve/>
3408                 <update permission="EMERGENCY_CLOSING">
3409                     <context link="closing" field="org_unit" />
3410                 </update>
3411                 <delete permission="EMERGENCY_CLOSING">
3412                     <context link="closing" field="org_unit" />
3413                 </delete>
3414             </actions>
3415         </permacrud>
3416     </class>
3417         <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">
3418                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3419                         <field name="close_end" reporter:datatype="timestamp" />
3420                         <field name="close_start" reporter:datatype="timestamp" />
3421                         <field name="id" reporter:datatype="id" />
3422                         <field name="org_unit" reporter:datatype="org_unit"/>
3423                         <field name="reason" reporter:datatype="text"/>
3424                         <field name="full_day" reporter:datatype="bool"/>
3425                         <field name="multi_day" reporter:datatype="bool"/>
3426                         <field name="emergency_closing" reporter:datatype="link"/>
3427                 </fields>
3428                 <links>
3429                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3430                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3431                 </links>
3432         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3433             <actions>
3434                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3435                 <retrieve/>
3436                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3437                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3438             </actions>
3439         </permacrud>
3440         </class>
3441         <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">
3442                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3443                         <field name="extended" reporter:datatype="interval"/>
3444                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3445                         <field name="max_renewals" reporter:datatype="int" />
3446                         <field name="name" reporter:datatype="text"/>
3447                         <field name="normal" reporter:datatype="interval"/>
3448                         <field name="shrt" reporter:datatype="interval"/>
3449                 </fields>
3450                 <links>
3451                 </links>
3452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3453             <actions>
3454                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3455                 <retrieve/>
3456                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3457                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3458             </actions>
3459         </permacrud>
3460         </class>
3461
3462         <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">
3463                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3464                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3465                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3466             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3467                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3468             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3469                 </fields>
3470                 <links>
3471             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3472                 </links>
3473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3474             <actions>
3475                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3476                 <retrieve/>
3477                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3478                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3479             </actions>
3480                 </permacrud>
3481         </class>
3482
3483         <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">
3484                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3485                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3486                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3487                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3488             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3489                 </fields>
3490                 <links>
3491                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3492                 </links>
3493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3494             <actions>
3495                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3496                 <retrieve/>
3497                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3498                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3499             </actions>
3500                 </permacrud>
3501         </class>
3502
3503         <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">
3504                 <fields oils_persist:primary="id" oils_persist:sequence="">
3505                         <field name="balance_owed" reporter:datatype="money"/>
3506                         <field name="id" reporter:datatype="id" />
3507                         <field name="last_billing_note" reporter:datatype="text"/>
3508                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3509                         <field name="last_billing_type" reporter:datatype="text"/>
3510                         <field name="last_payment_note" reporter:datatype="text"/>
3511                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3512                         <field name="last_payment_type" reporter:datatype="text"/>
3513                         <field name="total_owed" reporter:datatype="money"/>
3514                         <field name="total_paid" reporter:datatype="money"/>
3515                         <field name="usr" reporter:datatype="link"/>
3516                         <field name="xact_finish" reporter:datatype="timestamp" />
3517                         <field name="xact_start" reporter:datatype="timestamp" />
3518                         <field name="xact_type" reporter:datatype="text"/>
3519                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3520                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3521                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3522                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3523                         <field name="billing_location" reporter:datatype="link"/>
3524                 </fields>
3525                 <links>
3526                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3527                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3528                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3529                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3530                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3531                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3532                 </links>
3533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3534                         <actions>
3535                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3536                                         <context link="usr" field="home_ou" />
3537                                 </retrieve>
3538                         </actions>
3539                 </permacrud>
3540         </class>
3541         <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">
3542                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3543                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3544                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3545                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3546                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3547                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3548                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3549                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3550                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3551                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3552                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3553                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3554                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3555                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3556                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3557                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3558                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3559                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3560                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3561                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3562                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3563                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3564                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3565                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3566                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3567                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3568                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3569                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3570                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3571                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3572                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3573                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3574                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3575                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3576                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3577                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3578                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3579                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3580                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3581                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3582                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3583                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3584                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3585                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3586                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3587                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3588                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3589                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3590                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3591                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3592                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3593                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3594                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3595                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3596                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3597                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3598                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3599                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3600                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3601                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3602                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3603                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3606                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3607                 </fields>
3608                 <links>
3609                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3610                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3611                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3612                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3613                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3614                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3615                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3616                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3617                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3618                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3619                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3620                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3621                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3622                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3623                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3624                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3625                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3626                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3627                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3628                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3629                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3630                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3631                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3632                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3633                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3634                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3635                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3636                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3637                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3638                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3639                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3640                 </links>
3641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3642                         <actions>
3643                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3644                         </actions>
3645                 </permacrud>
3646         </class>
3647         <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">
3648                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3649                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3650                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3651                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3652                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3653                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3654                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3655                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3656                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3657         </fields>
3658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3659                         <actions>
3660                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3661                                 <retrieve/>
3662                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3663                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3664                         </actions>
3665                 </permacrud>
3666         </class>
3667         <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">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3669                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3670                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3671                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3672                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3673         </fields>
3674         <links>
3675                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3676                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3677                 </links>
3678                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3679                         <actions>
3680                                 <retrieve permission="RUN_REPORTS">
3681                                         <context link="usr" field="home_ou" />
3682                                 </retrieve>
3683                         </actions>
3684                 </permacrud>
3685         </class>
3686         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3687                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3688                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3689                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3690                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3691                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3692                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3693                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3694         </fields>
3695         <links>
3696                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3697                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3698                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3699                 </links>
3700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3701                         <actions>
3702                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3703                                         <context link="usr" field="home_ou" />
3704                                         <context link="ws" field="owning_lib" />
3705                                 </retrieve>
3706                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3707                                         <context link="usr" field="home_ou" />
3708                                         <context link="ws" field="owning_lib" />
3709                                 </create>
3710                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3711                                         <context link="usr" field="home_ou" />
3712                                         <context link="ws" field="owning_lib" />
3713                                 </update>
3714                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3715                                         <context link="usr" field="home_ou" />
3716                                         <context link="ws" field="owning_lib" />
3717                                 </delete>
3718                         </actions>
3719                 </permacrud>
3720         </class>
3721         <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">
3722                 <fields oils_persist:primary="name">
3723                         <field name="name" reporter:datatype="text"/>
3724                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3725                 </fields>
3726                 <links/>
3727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3728                         <actions>
3729                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3730                                 <retrieve/>
3731                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3732                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3733                         </actions>
3734                 </permacrud>
3735         </class>
3736         <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">
3737                 <fields oils_persist:primary="name">
3738                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3739                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3740                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3741                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3742                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3743                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3744                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3745                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3746                 </fields>
3747                 <links>
3748                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3749                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3750                 </links>
3751                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3752                         <actions>
3753                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3754                                 <retrieve/>
3755                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3756                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3757                         </actions>
3758                 </permacrud>
3759         </class>
3760         <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">
3761                 <fields oils_persist:primary="name">
3762                         <field name="name" reporter:datatype="text"/>
3763                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3764                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3765                         <field name="datatype" reporter:datatype="text"/>
3766                         <field name="view_perm" reporter:datatype="link"/>
3767                         <field name="update_perm" reporter:datatype="link"/>
3768                         <field name="fm_class" reporter:datatype="text"/>
3769                         <field name="grp" reporter:datatype="link"/>
3770                 </fields>
3771                 <links>
3772                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3773                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3774                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3775                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3776                 </links>
3777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3778                         <actions>
3779                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3780                                 <retrieve/>
3781                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3782                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3783                         </actions>
3784                 </permacrud>
3785         </class>
3786         <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">
3787                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3788                         <field name="id" />
3789                         <field name="name"  reporter:datatype="text"/>
3790                         <field name="org_unit" reporter:datatype="org_unit"/>
3791                         <field name="value"  reporter:datatype="text"/>
3792                 </fields>
3793                 <links>
3794                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3795                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3796                 </links>
3797         </class>
3798         <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">
3799                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3800                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3801                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3802                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3803                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3804                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3805                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3806                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3807                 </fields>
3808                 <links>
3809                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3810                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3811                 </links>
3812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3813             <actions>
3814                 <create permission="CREATE_COPY_NOTE">
3815                     <context link="owning_copy" field="circ_lib"/>
3816                 </create>
3817                 <retrieve permission="VIEW_COPY_NOTES">
3818                     <context link="owning_copy" field="circ_lib"/>
3819                 </retrieve>
3820                 <update permission="UPDATE_COPY_NOTE">
3821                     <context link="owning_copy" field="circ_lib"/>
3822                 </update>
3823                 <delete permission="DELETE_COPY_NOTE">
3824                     <context link="owning_copy" field="circ_lib"/>
3825                 </delete>
3826             </actions>
3827         </permacrud>
3828         </class>
3829         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3830                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3831                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3832                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3833                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3834                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3835                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3836                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3837                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3838                 </fields>
3839                 <links>
3840                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3841                 </links>
3842         </class>
3843         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3844                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3845                         <field name="fingerprint"  reporter:datatype="text"/>
3846                         <field name="id" reporter:datatype="id" />
3847                         <field name="master_record" reporter:datatype="link"/>
3848                         <field name="mods"  reporter:datatype="text"/>
3849                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3850                 </fields>
3851                 <links>
3852                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3853                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3854                 </links>
3855         </class>
3856         <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">
3857                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3858                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3859                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3860                 </fields>
3861                 <links/>
3862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3863             <actions>
3864                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3865                 <retrieve/>
3866                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3867                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3868             </actions>
3869         </permacrud>
3870         </class>
3871         <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">
3872                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3873                         <field name="code"  reporter:datatype="text"/>
3874                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3875                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3876                 </fields>
3877                 <links/>
3878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3879             <actions>
3880                 <create permission="CREATE_PERM" global_required="true"/>
3881                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3882                 <update permission="UPDATE_PERM" global_required="true"/>
3883                 <delete permission="DELETE_PERM" global_required="true"/>
3884             </actions>
3885         </permacrud>
3886         </class>
3887         <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">
3888                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3889                         <field name="id" reporter:datatype="id" />
3890                         <field name="metarecord" reporter:datatype="link"/>
3891                         <field name="source" reporter:datatype="link"/>
3892                 </fields>
3893                 <links>
3894                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3895                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3896                 </links>
3897         </class>
3898         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
3899                         oils_obj:fieldmapper="metabib::display_entry" 
3900                         oils_persist:tablename="metabib.display_entry" 
3901                         oils_persist:field_safe="true"
3902                         reporter:label="Display Field Entry" oils_persist:readonly="true">
3903                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
3904                         <field name="id" reporter:datatype="id" />
3905                         <field name="field" reporter:datatype="link"/>
3906                         <field name="source" reporter:datatype="link"/>
3907                         <field name="value"  reporter:datatype="text"/>
3908                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
3909                 </fields>
3910                 <links>
3911                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3912                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3913                 </links>
3914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3915                         <actions>
3916                                 <retrieve/>
3917                         </actions>
3918                 </permacrud>
3919         </class>
3920         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
3921                 oils_persist:tablename="metabib.flat_display_entry"
3922                 oils_obj:fieldmapper="metabib::flat_display_entry" 
3923                 oils_persist:field_safe="true"
3924                 reporter:label="Flat Display Entry" 
3925                 oils_persist:readonly="true">
3926                 <fields>
3927                         <field name="source" reporter:datatype="id" />
3928                         <field name="name" reporter:datatype="text"/>
3929                         <field name="multi" reporter:datatype="bool"/>
3930                         <field name="label" reporter:datatype="text"/>
3931                         <field name="field" reporter:datatype="link"/>
3932                         <field name="value" reporter:datatype="text"/>
3933                 </fields>
3934                 <links>
3935                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3936                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3937                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3938                 </links>
3939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3940                         <actions>
3941                                 <retrieve/>
3942                         </actions>
3943                 </permacrud>
3944         </class>
3945         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
3946                 oils_persist:tablename="metabib.compressed_display_entry"
3947                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
3948                 oils_persist:field_safe="true"
3949                 reporter:label="Compressed Display Entry" 
3950                 oils_persist:readonly="true">
3951                 <fields>
3952                         <field name="source" reporter:datatype="id" />
3953                         <field name="name" reporter:datatype="text"/>
3954                         <field name="multi" reporter:datatype="bool"/>
3955                         <field name="label" reporter:datatype="text"/>
3956                         <field name="field" reporter:datatype="link"/>
3957                         <field name="value" reporter:datatype="text"/>
3958                 </fields>
3959                 <links>
3960                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3961                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3962                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3963                 </links>
3964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3965                         <actions>
3966                                 <retrieve/>
3967                         </actions>
3968                 </permacrud>
3969         </class>
3970         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
3971                 oils_persist:tablename="metabib.wide_display_entry"
3972                 oils_obj:fieldmapper="metabib::wide_display_entry" 
3973                 oils_persist:field_safe="true"
3974                 reporter:label="Wide Display Entry" 
3975                 oils_persist:readonly="true">
3976                 <fields oils_persist:primary="source">
3977                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
3978                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
3979                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
3980                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
3981                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
3982                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
3983                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
3984                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
3985                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
3986                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
3987                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
3988                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
3989                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
3990                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
3991                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
3992                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
3993                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
3994                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
3995                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
3996                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
3997                 </fields>
3998                 <links>
3999                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4000                 </links>
4001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4002                         <actions>
4003                                 <retrieve/>
4004                         </actions>
4005                 </permacrud>
4006         </class>
4007
4008         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4009                 oils_persist:tablename="config.display_field_map"
4010                 oils_obj:fieldmapper="config::display_field_map"
4011                 oils_persist:field_safe="true"
4012                 reporter:label="Display Field Map">
4013                 <fields oils_persist:primary="name">
4014                         <field name="name" reporter:datatype="text"/>
4015                         <field name="field" reporter:datatype="link"/>
4016                         <field name="multi" reporter:datatype="bool"/>
4017                 </fields>
4018                 <links>
4019                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4020                 </links>
4021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4022                         <actions>
4023                                 <retrieve/>
4024                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4025                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4026                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4027                         </actions>
4028                 </permacrud>
4029         </class>
4030
4031         <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">
4032                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4033                         <field name="id" reporter:datatype="id" />
4034                         <field name="field" reporter:datatype="link"/>
4035                         <field name="source" reporter:datatype="link"/>
4036                         <field name="value"  reporter:datatype="text"/>
4037                 </fields>
4038                 <links>
4039                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4040                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4041                 </links>
4042         </class>
4043         <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">
4044                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4045                         <field name="id" reporter:datatype="id" />
4046                         <field name="value" reporter:datatype="text"/>
4047                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4048                 </fields>
4049                 <links>
4050                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4051                 </links>
4052         </class>
4053         <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">
4054                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4055                         <field name="id" reporter:datatype="id" />
4056                         <field name="entry" reporter:datatype="link"/>
4057                         <field name="def" reporter:datatype="link"/>
4058                         <field name="source" reporter:datatype="link"/>
4059                 </fields>
4060                 <links>
4061                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4062                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4063                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4064                 </links>
4065         </class>
4066         <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">
4067                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4068                         <field name="id" reporter:datatype="id" />
4069                         <field name="entry" reporter:datatype="link"/>
4070                         <field name="simple_heading" reporter:datatype="link"/>
4071                 </fields>
4072                 <links>
4073                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4074                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4075                 </links>
4076         </class>
4077         <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">
4078                 <oils_persist:source_definition>
4079                         SELECT * FROM metabib.author_field_entry
4080                                                 UNION ALL
4081                         SELECT * FROM metabib.keyword_field_entry
4082                                                 UNION ALL
4083                         SELECT * FROM metabib.identifier_field_entry
4084                                                 UNION ALL
4085                         SELECT * FROM metabib.title_field_entry
4086                                                 UNION ALL
4087                         SELECT * FROM metabib.subject_field_entry
4088                                                 UNION ALL
4089                         SELECT * FROM metabib.series_field_entry
4090                 </oils_persist:source_definition>
4091                 <fields>
4092                         <field name="field" reporter:datatype="link"/>
4093                         <field name="id" reporter:datatype="id" />
4094                         <field name="source" reporter:datatype="link"/>
4095                         <field name="value"  reporter:datatype="text"/>
4096                 </fields>
4097                 <links>
4098                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4099                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4100                 </links>
4101         </class>
4102         <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">
4103                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4104                         <field name="field" reporter:datatype="link"/>
4105                         <field name="id" reporter:datatype="id" />
4106                         <field name="source" reporter:datatype="link"/>
4107                         <field name="value"  reporter:datatype="text"/>
4108                 </fields>
4109                 <links>
4110                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4111                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4112                 </links>
4113         </class>
4114         <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">
4115                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4116                         <field name="accepting_usr" reporter:datatype="link"/>
4117                         <field name="amount" reporter:datatype="money" />
4118                         <field name="amount_collected" reporter:datatype="money" />
4119                         <field name="cash_drawer" reporter:datatype="link"/>
4120                         <field name="id" reporter:datatype="id" />
4121                         <field name="note"  reporter:datatype="text"/>
4122                         <field name="payment_ts" reporter:datatype="timestamp"/>
4123                         <field name="xact" reporter:datatype="link"/>
4124                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4125                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4126                 </fields>
4127                 <links>
4128                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4129                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4130                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4131                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4132                 </links>
4133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4134             <actions>
4135                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4136                     <context link="xact" jump="usr" field="home_ou"/>
4137                 </retrieve>
4138                         </actions>
4139                 </permacrud>
4140         </class>
4141         <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">
4142                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4143                         <field name="accepting_usr" reporter:datatype="link"/>
4144                         <field name="amount" reporter:datatype="money" />
4145                         <field name="amount_collected" reporter:datatype="money" />
4146                         <field name="id" reporter:datatype="id" />
4147                         <field name="note"  reporter:datatype="text"/>
4148                         <field name="payment_ts" reporter:datatype="timestamp"/>
4149                         <field name="xact" reporter:datatype="link"/>
4150                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4151                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4152                 </fields>
4153                 <links>
4154                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4155                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4156                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4157                 </links>
4158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4159             <actions>
4160                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4161                     <context link="xact" jump="usr" field="home_ou"/>
4162                 </retrieve>
4163                         </actions>
4164                 </permacrud>
4165         </class>
4166         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4167                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4168                         <field name="accepting_usr" reporter:datatype="link"/>
4169                         <field name="amount" reporter:datatype="money" />
4170                         <field name="amount_collected" reporter:datatype="money" />
4171                         <field name="id" reporter:datatype="id" />
4172                         <field name="note"  reporter:datatype="text"/>
4173                         <field name="payment_ts" reporter:datatype="timestamp"/>
4174                         <field name="xact" reporter:datatype="link"/>
4175                         <field name="billing" reporter:datatype="link"/>
4176                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4177                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4178                 </fields>
4179                 <links>
4180                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4181                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4182                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4183                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4184                 </links>
4185         </class>
4186         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4187                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4188                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4189                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4190                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4191                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4192                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4193                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4194                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4195                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4196                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4197                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4198                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4199                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4200                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4201                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4202                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4203                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4204                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4205                 </fields>
4206                 <links>
4207                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4208                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4209                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4210                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4211                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4212                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4213                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4214                 </links>
4215         </class>
4216
4217         <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">
4218                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4219                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4220                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4221                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4222                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4223                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4224                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4225                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4226                 </fields>
4227                 <links/>
4228         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4229             <actions>
4230                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4231                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4232                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4233                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4234             </actions>
4235         </permacrud>
4236         </class>
4237         <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">
4238                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4239                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4240                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4241                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4242                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4243                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4244                 </fields>
4245                 <links>
4246                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4247                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4248                         <link field="org_unit" 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                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4253                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4254                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4255                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4256             </actions>
4257         </permacrud>
4258         </class>
4259         <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">
4260                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4261                         <field name="holdable" reporter:datatype="bool"/>
4262                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4263                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4264                         <field name="opac_visible" reporter:datatype="bool"/>
4265             <field name="copy_active" reporter:datatype="bool"/>
4266             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4267             <field name="is_available" reporter:datatype="bool"/>
4268                 </fields>
4269                 <links/>
4270         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4271             <actions>
4272                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4273                 <retrieve/>
4274                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4275                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4276             </actions>
4277         </permacrud>
4278         </class>
4279         <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">
4280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4281                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4282                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4283                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4284                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4285                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4286                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4287                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4288                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4289                 </fields>
4290                 <links>
4291                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4292                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4293                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4294                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4295                 </links>
4296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4297                         <actions>
4298                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4299                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4300                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4301                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4302                         </actions>
4303                 </permacrud>
4304         </class>
4305         <class id="aua" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
4306                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4307                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4308                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4309                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4310                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4311                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4312                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4313                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4314                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4315                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4316                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4317                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4318                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4319                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4320                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4321                 </fields>
4322                 <links>
4323                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4324                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4325                 </links>
4326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4327                         <actions>
4328                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4329                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4330                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4331                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4332                         </actions>
4333                 </permacrud>
4334         </class>
4335         <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">
4336                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4337                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4338                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4339                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4340                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4341                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4342                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4343                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4344                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4345                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4346                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4347                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4348                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4349                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4350                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4351                 </fields>
4352                 <links>
4353                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4354                 </links>
4355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4356                         <actions>
4357                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4358                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4359                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4360                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4361                         </actions>
4362                 </permacrud>
4363         </class>
4364
4365
4366         <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">
4367                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4368                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4369                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4370                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4371                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4372                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4373                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4374                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4375                 </fields>
4376                 <links>
4377                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4378                 </links>
4379         </class>
4380
4381         <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">
4382                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4383                         <field name="call_number" />
4384                         <field name="create_date" reporter:datatype="timestamp"/>
4385                         <field name="creator" reporter:datatype="link"/>
4386                         <field name="id" reporter:datatype="id" />
4387                         <field name="pub" reporter:datatype="bool"/>
4388                         <field name="title"  reporter:datatype="text"/>
4389                         <field name="value"  reporter:datatype="text"/>
4390                 </fields>
4391                 <links>
4392                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4393                 </links>
4394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4395             <actions>
4396                 <create permission="CREATE_VOLUME_NOTE">
4397                     <context link="call_number" field="owning_lib"/>
4398                 </create>
4399                 <retrieve permission="VIEW_VOLUME_NOTES">
4400                     <context link="call_number" field="owning_lib"/>
4401                 </retrieve>
4402                 <update permission="UPDATE_VOLUME_NOTE">
4403                     <context link="call_number" field="owning_lib"/>
4404                 </update>
4405                 <delete permission="DELETE_VOLUME_NOTE">
4406                     <context link="call_number" field="owning_lib"/>
4407                 </delete>
4408             </actions>
4409         </permacrud>
4410         </class>
4411         <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">
4412                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4413                         <field name="create_date" reporter:datatype="timestamp"/>
4414                         <field name="creator" reporter:datatype="link"/>
4415                         <field name="edit_date" reporter:datatype="timestamp"/>
4416                         <field name="editor" reporter:datatype="link"/>
4417                         <field name="id" reporter:datatype="id" />
4418                         <field name="record" reporter:datatype="link"/>
4419                         <field name="value" reporter:datatype="text"/>
4420                 </fields>
4421                 <links>
4422                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4423                 </links>
4424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4425             <actions>
4426                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4427                 <retrieve/>
4428                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4429                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4430             </actions>
4431         </permacrud>
4432         </class>
4433         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4434         <oils_persist:source_definition>
4435 SELECT  usr,
4436         SUM(
4437             CASE
4438                 WHEN (
4439                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4440                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4441                 ) THEN 1
4442                 ELSE 0
4443             END
4444         ) AS out,
4445
4446         SUM(
4447             CASE
4448                 WHEN (
4449                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4450                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4451                 ) THEN 1
4452                 ELSE 0
4453             END
4454         ) AS overdue,
4455
4456         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4457         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4458         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4459   FROM  action.circulation
4460   WHERE checkin_time IS NULL
4461   GROUP BY 1
4462         </oils_persist:source_definition>
4463         <fields oils_persist:primary="usr">
4464             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4465             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4466             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4467             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4468             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4469             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4470         </fields>
4471         <links>
4472             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4473         </links>
4474         </class>
4475         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4476         <oils_persist:source_definition>
4477 SELECT  usr,
4478         STRING_AGG(
4479             CASE
4480                 WHEN (
4481                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4482                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4483                 ) THEN id::TEXT
4484                 ELSE '0'
4485             END
4486         ,',') AS out,
4487
4488         STRING_AGG(
4489             CASE
4490                 WHEN (
4491                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4492                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4493                 ) THEN id::TEXT
4494                 ELSE '0'
4495             END
4496         ,',') AS overdue,
4497
4498         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4499         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4500         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4501   FROM  action.circulation
4502   WHERE checkin_time IS NULL
4503   GROUP BY 1
4504         </oils_persist:source_definition>
4505         <fields oils_persist:primary="usr">
4506             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4507             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4508             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4509             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4510             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4511             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4512         </fields>
4513         <links>
4514             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4515         </links>
4516         </class>
4517         <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">
4518                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4519                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4520                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4521                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4522                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4523                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4524                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4525                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4526                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4527                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4528                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4529                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4530                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4531                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4532                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4533                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4534                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4535                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4536                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4537                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4538                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4539                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4540                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4541                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4542                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4543                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4544                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4545                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4546                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4547                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4548                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4549                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4550                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4551                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4552                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4553                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4554                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4555                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4556                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4557                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4558                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4559                 </fields>
4560                 <links>
4561                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4562                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4563                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4564                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4565                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4566                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4567                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4568                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4569                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4570                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4571                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4572                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4573                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4574                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4575                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4576                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4577                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4578                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4579                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4580                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4581                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4582                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4583                 </links>
4584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4585                         <actions>
4586                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4587                         </actions>
4588                 </permacrud>
4589         </class>
4590         <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">
4591                 <fields>
4592                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4593                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4594                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4595                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4596                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4597                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4598                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4599                 </fields>
4600                 <links>
4601                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4602                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4603                 </links>
4604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4605                         <actions>
4606                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4607                         </actions>
4608                 </permacrud>
4609         </class>
4610         <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">
4611                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4612                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4613                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4614                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4615                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4616                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4617                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4618                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4619                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4620                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4621                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4622                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4623                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4624                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4625                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4626                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4627                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4628                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4629                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4630                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4631                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4632                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4633                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4634                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4635                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4636                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4637                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4638                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4639                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4640                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4641                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4642                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4643                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4644                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4645                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4646                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4647                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4648                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4649                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4650                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4651                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4652                 </fields>
4653                 <links>
4654                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4655                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4656                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4657                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4658                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4659                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4660                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4661                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4662                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4663                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4664                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4665                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4666                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4667                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4668                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4669                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4670                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4671                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4672                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4673                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4674                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4675                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4676                 </links>
4677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4678                         <actions>
4679                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4680                         </actions>
4681                 </permacrud>
4682         </class>
4683
4684         <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">
4685                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4686                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4687                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4688                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4689                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4690                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4691                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4692                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4693                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4694                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4695                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4696                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4697                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4698                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4699                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4700                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4701                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4702                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4703                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4704                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4705                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4706                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4707                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4708                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4709                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4710                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4711                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4712                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4713                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4714                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4715                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4716                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4717                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4718                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4719                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4720                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4721                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4722                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4723                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4724                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4725                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4726                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4727                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4728                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4729                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4730                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4731                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4732                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4733                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4734                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4735                 </fields>
4736                 <links>
4737                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4738                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4739                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4740                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4741                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4742                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4743                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4744                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4745                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4746                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4747                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4748                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4749                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4750                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4751                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4752                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4753                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4754                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4755                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4756                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4757                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4758                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4759                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4760                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4761                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4762                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4763                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4764                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4765                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4766                 </links>
4767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4768                         <actions>
4769                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4770                         </actions>
4771                 </permacrud>
4772         </class>
4773         <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">
4774                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4775                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4776                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4777                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4778                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4779                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4780                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4781                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4782                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4783                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4784                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4785                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4786                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4787                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4788                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4789                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4790                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4791                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4792                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4793                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4794                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4795                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4796                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4797                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4798                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4799                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4800                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4801                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4802                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4803                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4804                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4805                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4806                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4807                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4808                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4809                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4810                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4811                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4812                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4813                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4814                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4815                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4816                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4817                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4818                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4819                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4820                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4821                 </fields>
4822                 <links>
4823                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4824                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4825                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4826                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4827                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4828                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4829                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4830                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4831                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4832                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4833                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4834                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4835                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4836                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4837                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4838                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4839                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4840                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4841                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4842                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4843                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4844                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4845                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4846                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4847                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4848                 </links>
4849         </class>
4850         <class id="auch" 
4851                 controller="open-ils.cstore" 
4852                 oils_obj:fieldmapper="action::user_circ_history" 
4853                 oils_persist:tablename="action.usr_circ_history" 
4854                 reporter:label="User Checkout History">
4855                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4856                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4857                         <!-- prevent reporting on the user that owns the checkout history -->
4858                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4859                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4860                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4861                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4862                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4863                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4864                 </fields>
4865                 <links>
4866                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4867                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4868                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4869                 </links>
4870         </class>
4871         <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">
4872                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4873                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4874                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4875                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4876                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4877                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4878                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4879                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4880                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4881                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4882                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4883                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4884                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4885                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4886                 </fields>
4887                 <links>
4888                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4889                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4890                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4891                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4892                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4893                 </links>
4894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4895                         <actions>
4896                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4897                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4898                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4899                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4900                         </actions>
4901                 </permacrud>
4902         </class>
4903
4904         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4905                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4906                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4907                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4908                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4909                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4910                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4911                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4912                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4913                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4914                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4915                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4916                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4917                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4918                 </fields>
4919                 <links>
4920                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4921                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4922                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4923                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4924                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4925                 </links>
4926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4927                         <actions>
4928                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4929                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4930                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4931                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4932                         </actions>
4933                 </permacrud>
4934         </class>
4935         
4936         <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">
4937                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4938                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4939                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4940                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4941                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4942                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4943                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4944                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4945                 </fields>
4946                 <links>
4947                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4948                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4949                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4950                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4951                 </links>
4952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4953                         <actions>
4954                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4955                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4956                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4957                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4958                         </actions>
4959                 </permacrud>
4960         </class>
4961         
4962         <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">
4963                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4964                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4965                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4966                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4967                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4968                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4969                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4970                 </fields>
4971                 <links>
4972                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4973                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4974                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4975                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4976                 </links>
4977                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4978                         <actions>
4979                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4980                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4981                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4982                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4983                         </actions>
4984                 </permacrud>
4985         </class>
4986         
4987         <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">
4988                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4989                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4990                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4991                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4992                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4993                 </fields>
4994                 <links>
4995                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4996                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4997                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4998                 </links>
4999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5000                         <actions>
5001                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5002                     <context link="resource" field="owner" />
5003                 </create>
5004                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5005                     <context link="resource" field="owner" />
5006                 </retrieve>
5007                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5008                     <context link="resource" field="owner" />
5009                 </update>
5010                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5011                     <context link="resource" field="owner" />
5012                 </delete>
5013                         </actions>
5014                 </permacrud>
5015         </class>
5016         
5017         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5018                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5019                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5020                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5021                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5022                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5023                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5024                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5025                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5026                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5027                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5028                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5029                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5030                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
5031                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
5032                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5033                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5034                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5035                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5036                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5037                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5038                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5039                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5040                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5041                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5042                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5043                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5044                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5045                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5046                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5047                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5048                 </fields>
5049                 <links>
5050                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5051                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5052                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5053                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5054                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5055                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5056                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5057                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5058                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5059                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5060                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
5061                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5062                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5063                 </links>
5064                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5065                         <actions>
5066                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5067                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5068                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5069                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5070                         </actions>
5071                 </permacrud>
5072         </class>
5073         
5074         <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">
5075                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5076                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5077                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5078                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5079                 </fields>
5080                 <links>
5081                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5082                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5083                 </links>
5084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5085                         <actions>
5086                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5087                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5088                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5089                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5090                         </actions>
5091                 </permacrud>
5092         </class>
5093
5094         <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">
5095                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5096                         <field name="bucket" reporter:datatype="link"/>
5097                         <field name="id" reporter:datatype="id" />
5098                         <field name="target_call_number" reporter:datatype="link" />
5099                         <field name="create_time" reporter:datatype="timestamp" />
5100                         <field name="pos" reporter:datatype="int" />
5101                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5102                 </fields>
5103                 <links>
5104                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5105                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5106             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5107                 </links>
5108                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5109                         <actions>
5110                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5111                     <context link="bucket" owning_lib="owning_lib"/>
5112                 </retrieve>
5113             </actions>
5114         </permacrud>
5115         </class>
5116         <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">
5117                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5118                         <field name="id" reporter:datatype="id" />
5119                         <field name="item" reporter:datatype="link"/>
5120                         <field name="note" reporter:datatype="text" />
5121                 </fields>
5122                 <links>
5123                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5124                 </links>
5125         </class>
5126         <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">
5127                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5128                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5129                         <field name="btype" reporter:datatype="text"/>
5130                         <field name="id" reporter:datatype="id" />
5131                         <field name="name" reporter:datatype="text"/>
5132                         <field name="description" reporter:datatype="text"/>
5133                         <field name="owner" reporter:datatype="link"/>
5134                         <field name="pub" reporter:datatype="bool"/>
5135                         <field name="create_time" reporter:datatype="timestamp" />
5136                         <field name="owning_lib" reporter:datatype="org_unit" />
5137                 </fields>
5138                 <links>
5139                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5140                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5141                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5142                 </links>
5143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5144                         <actions>
5145                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5146                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5147                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5148                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5149                         </actions>
5150                 </permacrud>
5151         </class>
5152         <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">
5153                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5154                         <field name="id" reporter:datatype="id" />
5155                         <field name="bucket" reporter:datatype="link"/>
5156                         <field name="note" reporter:datatype="text" />
5157                 </fields>
5158                 <links>
5159                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5160                 </links>
5161         </class>
5162         <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">
5163                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5164                         <field name="hold" reporter:datatype="link"/>
5165                         <field name="id" reporter:datatype="id" />
5166                         <field name="target_copy" reporter:datatype="link"/>
5167                         <field name="proximity" reporter:datatype="number"/>
5168                 </fields>
5169                 <links>
5170                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5171                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5172                 </links>
5173         </class>
5174         <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">
5175                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5176                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5177                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5178                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5179                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5180                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5181                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5182                 </fields>
5183                 <links>
5184                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5185                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5186                 </links>
5187         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5188             <actions>
5189                 <create permission="CREATE_HOLD_NOTIFICATION">
5190                                         <context link="hold" jump="usr" field="home_ou" />
5191                                 </create>
5192                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5193                                         <context link="hold" jump="usr" field="home_ou" />
5194                                 </retrieve>
5195                 <update permission="CREATE_HOLD_NOTIFICATION">
5196                                         <context link="hold" jump="usr" field="home_ou" />
5197                                 </update>
5198                 <delete permission="CREATE_HOLD_NOTIFICATION">
5199                                         <context link="hold" jump="usr" field="home_ou" />
5200                                 </delete>
5201             </actions>
5202         </permacrud>
5203         </class>
5204         <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">
5205                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5206                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5207                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5208                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5209                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5210                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5211                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5212                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5213                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5214                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5215                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5216                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5217                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5218                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5219                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5220                 </fields>
5221                 <links>
5222                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5223                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5224                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5225                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5226                 </links>
5227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5228             <actions>
5229                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5230                 <retrieve/>
5231                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5232                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5233             </actions>
5234         </permacrud>
5235         </class>
5236         <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">
5237                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5238                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5239                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5240                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5241                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5242             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5243             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5244             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5245                 </fields>
5246                 <links>
5247                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5248                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5249                 </links>
5250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5251             <actions>
5252                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5253                 <retrieve/>
5254                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5255                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5256             </actions>
5257         </permacrud>
5258         </class>
5259         <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">
5260                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5261                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5262             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5263             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5264                 </fields>
5265                 <links>
5266                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5267                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5268                 </links>
5269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5270             <actions>
5271                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5272                                         <context link="lgroup" field="owner" />
5273                 </create>
5274                 <retrieve/>
5275                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5276                                         <context link="lgroup" field="owner" />
5277                 </update>
5278                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5279                                         <context link="lgroup" field="owner" />
5280                 </delete>
5281             </actions>
5282         </permacrud>
5283         </class>
5284
5285     <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">
5286         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5287             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5288             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5289             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5290             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5291         </fields>
5292         <links>
5293             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5294             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5295         </links>
5296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5297             <actions>
5298                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5299                 <retrieve/>
5300                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5301                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5302             </actions>
5303         </permacrud>
5304     </class>
5305
5306         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5307                 <fields>
5308                         <field name="sre_id" oils_persist:virtual="true" />
5309                         <field name="location" oils_persist:virtual="true" />
5310                         <field name="owning_lib" oils_persist:virtual="true" />
5311                         <field name="basic_holdings" oils_persist:virtual="true" />
5312                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5313                         <field name="supplement_holdings" oils_persist:virtual="true" />
5314                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5315                         <field name="index_holdings" oils_persist:virtual="true" />
5316                         <field name="index_holdings_add" oils_persist:virtual="true" />
5317                         <field name="online" oils_persist:virtual="true" />
5318                         <field name="missing" oils_persist:virtual="true" />
5319                         <field name="incomplete" oils_persist:virtual="true" />
5320                 </fields>
5321         </class>
5322
5323         <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">
5324                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5325                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5326                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5327                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5328                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5329                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5330                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5331                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5332                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5333                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5334                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5335                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5336                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5337                 </fields>
5338                 <links>
5339                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5340                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5341                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5342                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5343                 </links>
5344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5345                         <actions>
5346                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5347                                 <retrieve/>
5348                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5349                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5350                         </actions>
5351                 </permacrud>
5352         </class>
5353
5354         <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">
5355                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5356                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5357                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5358                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5359                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5360                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5361                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5362                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5363                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5364                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5365                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5366                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5367                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5368                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5369                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5370                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5371                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5372                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5373                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5374                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5375                 </fields>
5376                 <links>
5377                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5378                 </links>
5379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5380                         <actions>
5381                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5382                                         <context link="subscription" field="owning_lib" />
5383                                 </create>
5384                                 <retrieve />
5385                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5386                                         <context link="subscription" field="owning_lib" />
5387                                 </update>
5388                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5389                                         <context link="subscription" field="owning_lib" />
5390                                 </delete>
5391                         </actions>
5392                 </permacrud>
5393         </class>
5394
5395         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5396                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5397                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5398                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5399                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5400                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5401                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5402                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5403                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5404                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5405                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5406                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5407                 </fields>
5408                 <links>
5409                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5410                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5411                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5412                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5413                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5414                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5415                 </links>
5416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5417                         <actions>
5418                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5419                                 <retrieve />
5420                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5421                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5422                         </actions>
5423                 </permacrud>
5424         </class>
5425
5426         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
5427                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5428                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5429                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5430                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5431                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5432                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5433                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5434                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5435                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5436                 </fields>
5437                 <links>
5438                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5439                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5440                 </links>
5441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5442                         <actions>
5443                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5444                     <context link="subscription" field="owning_lib"/>
5445                 </create>
5446                                 <retrieve />
5447                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5448                     <context link="subscription" field="owning_lib"/>
5449                 </update>
5450                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5451                     <context link="subscription" field="owning_lib"/>
5452                 </delete>
5453                         </actions>
5454                 </permacrud>
5455         </class>
5456
5457         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5458                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5459                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5460                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5461                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5462                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5463                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5464                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5465                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5466                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5467                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5468                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5469                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5470                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5471                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5472                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5473                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5474                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5475                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5476                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5477                 </fields>
5478                 <links>
5479                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5480                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5481                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5482                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5483                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5484                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5485                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5486                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5487                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5488                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5489                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5490                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5491                 </links>
5492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5493                         <actions>
5494                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5495                                 <retrieve />
5496                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5497                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5498                         </actions>
5499                 </permacrud>
5500         </class>
5501
5502         <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">
5503                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5504                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5505                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5506                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5507                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5508                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5509                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5510                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5511                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5512                 </fields>
5513                 <links>
5514                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5515                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5516                 </links>
5517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5518                         <actions>
5519                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5520                                         <context link="distribution" field="holding_lib" />
5521                                 </create>
5522                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5523                                         <context link="distribution" field="holding_lib" />
5524                                 </retrieve>
5525                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5526                                         <context link="distribution" field="holding_lib" />
5527                                 </update>
5528                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5529                                         <context link="distribution" field="holding_lib" />
5530                                 </delete>
5531                         </actions>
5532                 </permacrud>
5533         </class>
5534
5535         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5536                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5537                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5538                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5539                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5540                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5541                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5542                 </fields>
5543                 <links>
5544                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5545                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5546                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5547                 </links>
5548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5549                         <actions>
5550                                 <create permission="ADMIN_SERIAL_STREAM">
5551                                         <context link="distribution" field="holding_lib" />
5552                                 </create>
5553                                 <retrieve />
5554                                 <update permission="ADMIN_SERIAL_STREAM">
5555                                         <context link="distribution" field="holding_lib" />
5556                                 </update>
5557                                 <delete permission="ADMIN_SERIAL_STREAM">
5558                                         <context link="distribution" field="holding_lib" />
5559                                 </delete>
5560                         </actions>
5561                 </permacrud>
5562         </class>
5563
5564         <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">
5565                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5566                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5567                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5568                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5569                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5570                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5571                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5572                 </fields>
5573                 <links>
5574                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5575                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5576                 </links>
5577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5578                         <actions>
5579                                 <create permission="ADMIN_SERIAL_STREAM">
5580                                         <context link="stream" jump="distribution" field="holding_lib" />
5581                                 </create>
5582                                 <retrieve permission="RECEIVE_SERIAL">
5583                                         <context link="stream" jump="distribution" field="holding_lib" />
5584                                 </retrieve>
5585                                 <update permission="ADMIN_SERIAL_STREAM">
5586                                         <context link="stream" jump="distribution" field="holding_lib" />
5587                                 </update>
5588                                 <delete permission="ADMIN_SERIAL_STREAM">
5589                                         <context link="stream" jump="distribution" field="holding_lib" />
5590                                 </delete>
5591                         </actions>
5592                 </permacrud>
5593         </class>
5594
5595         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5596                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5597                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5598                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5599                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5600                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5601                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5602                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5603                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5604                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5605                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5606                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5607                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5608                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5609                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5610                 </fields>
5611                 <links>
5612                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5613                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5614                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5615                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5616                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5617                 </links>
5618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5619                         <actions>
5620                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5621                                         <context link="subscription" field="owning_lib" />
5622                                 </create>
5623                                 <retrieve/>
5624                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5625                                         <context link="subscription" field="owning_lib" />
5626                                 </update>
5627                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5628                                         <context link="subscription" field="owning_lib" />
5629                                 </delete>
5630                         </actions>
5631                 </permacrud>
5632         </class>
5633
5634         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5635                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5636                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5637                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5638                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5639                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5640                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5641                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5642                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5643                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5644                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5645                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5646                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5647                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5648                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5649                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5650                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5651                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5652                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5653                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5654                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5655                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5656                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5657                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5658                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5659                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5660                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5661                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5662                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5663                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5664                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5665                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5666                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5667                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5668                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5669                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5670                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5671                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5672                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5673                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5674                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5675                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5676                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5677                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5678                 </fields>
5679                 <links>
5680                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5681                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5682                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5683                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5684                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5685                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5686                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5687                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5688                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5689                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5690                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5691                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5692                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5693                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5694                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5695                 </links>
5696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5697                         <actions>
5698                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5699                                 <retrieve/>
5700                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5701                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5702                         </actions>
5703                 </permacrud>
5704         </class>
5705
5706         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5707                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5708                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5709                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5710                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5711                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5712                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5713                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5714                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5715                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5716                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5717                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5718                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5719                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5720                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5721                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5722                 </fields>
5723                 <links>
5724                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5725                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5726                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5727                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5728                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5729                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5730                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5731                 </links>
5732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5733                         <actions>
5734                                 <create permission="ADMIN_SERIAL_ITEM">
5735                                         <context link="stream" jump="distribution" field="holding_lib" />
5736                                 </create>
5737                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5738                                         <context link="stream" jump="distribution" field="holding_lib" />
5739                                 </retrieve>
5740                                 <update permission="ADMIN_SERIAL_ITEM">
5741                                         <context link="stream" jump="distribution" field="holding_lib" />
5742                                 </update>
5743                                 <delete permission="ADMIN_SERIAL_ITEM">
5744                                         <context link="stream" jump="distribution" field="holding_lib" />
5745                                 </delete>
5746                         </actions>
5747                 </permacrud>
5748         </class>
5749
5750         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5751                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5752                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5753                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5754                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5755                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5756                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5757                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5758                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5759                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5760                 </fields>
5761                 <links>
5762                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5763                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5764                 </links>
5765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5766                         <actions>
5767                                 <create permission="ADMIN_SERIAL_ITEM">
5768                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5769                                 </create>
5770                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5771                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5772                                 </retrieve>
5773                                 <update permission="ADMIN_SERIAL_ITEM">
5774                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5775                                 </update>
5776                                 <delete permission="ADMIN_SERIAL_ITEM">
5777                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5778                                 </delete>
5779                         </actions>
5780                 </permacrud>
5781         </class>
5782         <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">
5783                 <fields>
5784                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5785                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5786                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5787                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5788                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5789                 </fields>
5790                 <links>
5791                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5792                 </links>
5793         </class>
5794         <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">
5795                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5796                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5797                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5798                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5799                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5800                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5801                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5802                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5803                 </fields>
5804                 <links>
5805                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5806                 </links>
5807         </class>
5808         <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">
5809                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5810                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5811                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5812                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5813                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5814                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5815                 </fields>
5816                 <links>
5817                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5818                 </links>
5819                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5820                         <actions>
5821                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5822                                         <context link="distribution" field="holding_lib" />
5823                                 </create>
5824                                 <retrieve/>
5825                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5826                                         <context link="distribution" field="holding_lib" />
5827                                 </update>
5828                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5829                                         <context link="distribution" field="holding_lib" />
5830                                 </delete>
5831                         </actions>
5832                 </permacrud>
5833         </class>
5834
5835         <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">
5836                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5837                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5838                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5839                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5840                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5841                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5842                 </fields>
5843                 <links>
5844                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5845                 </links>
5846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5847                         <actions>
5848                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5849                                         <context link="distribution" field="holding_lib" />
5850                                 </create>
5851                                 <retrieve/>
5852                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5853                                         <context link="distribution" field="holding_lib" />
5854                                 </update>
5855                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5856                                         <context link="distribution" field="holding_lib" />
5857                                 </delete>
5858                         </actions>
5859                 </permacrud>
5860         </class>
5861
5862         <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">
5863                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5864                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5865                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5866                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5867                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5868                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5869                 </fields>
5870                 <links>
5871                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5872                 </links>
5873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5874                         <actions>
5875                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5876                                         <context link="distribution" field="holding_lib" />
5877                                 </create>
5878                                 <retrieve/>
5879                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5880                                         <context link="distribution" field="holding_lib" />
5881                                 </update>
5882                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5883                                         <context link="distribution" field="holding_lib" />
5884                                 </delete>
5885                         </actions>
5886                 </permacrud>
5887         </class>
5888
5889         <class id="spt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::pattern_template" oils_persist:tablename="serial.pattern_template" reporter:label="Prediction Pattern Template">
5890                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5891                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5892                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5893                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5894                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5895                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5896                 </fields>
5897                 <links>
5898                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5899                 </links>
5900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5901                         <actions>
5902                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5903                                 <retrieve/>
5904                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5905                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5906                         </actions>
5907                 </permacrud>
5908         </class>
5909
5910         <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">
5911                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5912                         <field name="id" reporter:datatype="id" />
5913                         <field name="owning_copy" reporter:datatype="link"/>
5914                         <field name="stat_cat" reporter:datatype="link"/>
5915                         <field name="stat_cat_entry" reporter:datatype="link"/>
5916                 </fields>
5917                 <links>
5918                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5919                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5920                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5921                 </links>
5922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5923                         <actions>
5924                                 <retrieve/>
5925                         </actions>
5926                 </permacrud>
5927         </class>
5928         <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">
5929                 <fields oils_persist:primary="code">
5930                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5931                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5932                 </fields>
5933                 <links/>
5934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5935             <actions>
5936                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5937                 <retrieve/>
5938                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5939                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5940             </actions>
5941         </permacrud>
5942         </class>
5943         <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">
5944                 <fields oils_persist:primary="code">
5945                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5946                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5947                 </fields>
5948                 <links/>
5949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5950             <actions>
5951                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5952                 <retrieve/>
5953                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5954                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5955             </actions>
5956         </permacrud>
5957         </class>
5958         <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">
5959                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5960                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5961                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5962                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5963                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5964                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5965                 </fields>
5966                 <links>
5967             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5968         </links>
5969         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5970             <actions>
5971                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5972                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5973                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5974                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5975             </actions>
5976         </permacrud>
5977         </class>
5978         <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">
5979                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5980                         <field name="id" reporter:datatype="id" />
5981                         <field name="name" reporter:datatype="text"/>
5982                 </fields>
5983                 <links/>
5984         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5985             <actions>
5986                 <create permission="CREATE_LASSO" global_required="true"/>
5987                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5988                 <update permission="UPDATE_LASSO" global_required="true"/>
5989                 <delete permission="DELETE_LASSO" global_required="true"/>
5990             </actions>
5991         </permacrud>
5992         </class>
5993         <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">
5994                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5995                         <field name="id" reporter:datatype="id" />
5996                         <field name="lasso" reporter:datatype="link"/>
5997                         <field name="org_unit" reporter:datatype="org_unit"/>
5998                 </fields>
5999                 <links>
6000                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6001                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6002                 </links>
6003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6004             <actions>
6005                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6006                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6007                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6008                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6009             </actions>
6010         </permacrud>
6011         </class>
6012         <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">
6013                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6014                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6015                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6016                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6017                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6018                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6019                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6020                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6021                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6022                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6023                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6024                 </fields>
6025                 <links>
6026                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6027                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6028                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6029                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6030                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6031                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6032                 </links>
6033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6034             <actions>
6035                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6036                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6037                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6038                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6039             </actions>
6040         </permacrud>
6041         </class>
6042         <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">
6043                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6044                         <field name="id" reporter:datatype="id" />
6045                         <field name="from_org" reporter:datatype="org_unit"/>
6046                         <field name="to_org" reporter:datatype="org_unit"/>
6047                         <field name="prox" reporter:datatype="int" />
6048                 </fields>
6049                 <links>
6050                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6051                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6052                 </links>
6053         </class>
6054         <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">
6055                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6056                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6057                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6058                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6059                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6060                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6061                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6062                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6063                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6064                 </fields>
6065                 <links/>
6066         </class>
6067         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6068                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6069                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6070                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6071                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6072                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6073                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6074                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6075                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6076                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6077                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6078                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6079                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6080                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6081                 </fields>
6082                 <links>
6083                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6084                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6085                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6086                 </links>
6087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6088             <actions>
6089                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6090                 <retrieve/>
6091                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6092                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6093             </actions>
6094         </permacrud>
6095         </class>
6096         <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">
6097                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6098                         <field name="address_type"  reporter:datatype="text"/>
6099                         <field name="city"  reporter:datatype="text"/>
6100                         <field name="country"  reporter:datatype="text"/>
6101                         <field name="county"  reporter:datatype="text"/>
6102                         <field name="id" reporter:datatype="id" />
6103                         <field name="org_unit" reporter:datatype="org_unit"/>
6104                         <field name="post_code"  reporter:datatype="text"/>
6105                         <field name="state"  reporter:datatype="text"/>
6106                         <field name="street1"  reporter:datatype="text"/>
6107                         <field name="street2"  reporter:datatype="text"/>
6108                         <field name="valid" reporter:datatype="bool"/>
6109                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
6110                 </fields>
6111                 <links>
6112                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6113                 </links>
6114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6115             <actions>
6116                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6117                 <retrieve/>
6118                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6119                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6120             </actions>
6121         </permacrud>
6122         </class>
6123         <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">
6124                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6125                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6126                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6127                         <field name="query_text" reporter:datatype="text"/>
6128                 </fields>
6129         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6130             <actions>
6131                 <retrieve/>
6132             </actions>
6133         </permacrud>
6134         </class>
6135
6136         <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">
6137                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6138                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6139                         <field name="owner" reporter:datatype="org_unit"/>
6140                         <field name="code" reporter:datatype="text"/>
6141                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6142                         <field name="create_date" reporter:datatype="timestamp"/>
6143                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6144                 </fields>
6145                 <links>
6146                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6147                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6148                 </links>
6149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6150             <actions>
6151                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6152                 <retrieve/>
6153                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6154                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6155             </actions>
6156         </permacrud>
6157         </class>
6158         <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">
6159                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6160                         <field name="id" reporter:datatype="id"/>
6161                         <field name="grp" reporter:datatype="link"/>
6162                         <field name="pos" reporter:datatype="int"/>
6163                         <field name="query" reporter:datatype="link"/>
6164                 </fields>
6165                 <links>
6166                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6167                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6168                 </links>
6169         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6170             <actions>
6171                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6172                     <context link="grp" field="owner"/>
6173                 </create>
6174                 <retrieve/>
6175                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6176                     <context link="grp" field="owner"/>
6177                 </update>
6178                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6179                     <context link="grp" field="owner"/>
6180                 </delete>
6181             </actions>
6182         </permacrud>
6183         </class>
6184
6185         <!-- A note: Please update alhr and ahopl when updating ahr -->
6186         <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">
6187                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6188                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6189                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6190                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6191                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6192                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6193                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6194                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6195                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6196                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6197                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6198                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6199                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6200                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6201                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6202                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6203                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6204                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6205                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6206                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6207                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6208                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6209                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6210                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6211                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6212                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6213                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6214                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6215                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6216                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6217                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6218                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6219                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6220                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6221                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6222                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6223                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6224                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6225                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6226                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6227                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6228                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6229                 </fields>
6230                 <links>
6231                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6232                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6233                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6234                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6235                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6236                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6238                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6239                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6240                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6241                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6242                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6243                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6244                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6245                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6246                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6247                 </links>
6248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6249                         <actions>
6250                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6251                         </actions>
6252                 </permacrud>
6253         </class>
6254         <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">
6255                 <oils_persist:source_definition><![CDATA[
6256                 SELECT
6257                         ahr.*,
6258                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6259                                 copy_location_order_position,
6260                         CASE WHEN au.alias IS NOT NULL THEN
6261                                 au.alias
6262                         ELSE
6263                                 au.first_given_name
6264                         END AS usr_alias_or_first_given_name,
6265                         au.first_given_name AS usr_first_given_name,
6266                         au.second_given_name AS usr_second_given_name,
6267                         au.family_name AS usr_family_name,
6268                         au.prefix AS usr_prefix,
6269                         au.suffix AS usr_suffix,
6270                         au.alias AS usr_alias,
6271                         CASE WHEN au.alias IS NOT NULL THEN
6272                                 au.alias
6273                         ELSE
6274                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6275                                         COALESCE(au.family_name, ''),
6276                                         COALESCE(au.suffix, ''),
6277                                         ', ',
6278                                         COALESCE(au.prefix, ''),
6279                                         COALESCE(au.first_given_name, ''),
6280                                         COALESCE(au.second_given_name, '')
6281                                 ], ' '), E'\\s+,', ',')
6282                         END AS usr_alias_or_display_name,
6283                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6284                                 COALESCE(au.family_name, ''),
6285                                 COALESCE(au.suffix, ''),
6286                                 ', ',
6287                                 COALESCE(au.prefix, ''),
6288                                 COALESCE(au.first_given_name, ''),
6289                                 COALESCE(au.second_given_name, '')
6290                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6291                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6292                                 AS call_number_label,
6293                         siss.label AS issuance_label,
6294                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6295                         ahcm_1.copy_count AS potential_copies
6296                 FROM action.hold_request ahr
6297                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6298                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6299                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6300                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6301                 JOIN actor.usr au ON (au.id = ahr.usr)
6302                 JOIN (
6303                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6304                         FROM asset.copy_location
6305                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6306                 LEFT JOIN actor.usr_standing_penalty ausp 
6307                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6308                 LEFT JOIN config.standing_penalty csp
6309                         ON (
6310                                 csp.id = ausp.standing_penalty AND 
6311                                 csp.block_list LIKE '%CAPTURE%' AND (
6312                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6313                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6314                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6315                                         )
6316                                 )
6317                         )
6318                 JOIN (
6319                         SELECT COUNT(target_copy) AS copy_count, hold
6320                         FROM action.hold_copy_map
6321                         GROUP BY 2
6322                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6323                 LEFT JOIN serial.issuance siss
6324                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6325                 LEFT JOIN asset.copy_location_order acplo
6326                         ON (acp.location = acplo.location AND
6327                                 acp.circ_lib = acplo.org)
6328                 WHERE
6329                         ahr.capture_time IS NULL AND
6330                         ahr.cancel_time IS NULL AND
6331                         csp.id IS NULL AND
6332                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6333                         acp.status IN (0,7)
6334                 ]]></oils_persist:source_definition>
6335                 <fields oils_persist:primary="id">
6336                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6337                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6338                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6339                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6340                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6341                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6342                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6343                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6344                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6345                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6346                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6347                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6348                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6349                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6350                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6351                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6352                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6353                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6354                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6355                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6356                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6357                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6358                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6359                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6360                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6361                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6362                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6363                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6364                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6365                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6366                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6367                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6368                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6369                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6370                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6371                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6372                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6373                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6374                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6375                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6376                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6377                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6378                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6379                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6380                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6381                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6382                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6383                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6384                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6385                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6386                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6387                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6388                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6389                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6390                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6391                 </fields>
6392                 <links>
6393                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6394                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6395                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6396                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6397                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6398                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6399                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6400                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6401                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6402                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6403                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6404                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6405                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6406                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6407                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6408                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6409                 </links>
6410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6411                         <actions>
6412                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6413                         </actions>
6414                 </permacrud>
6415         </class>
6416         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6417                 <oils_persist:source_definition>
6418                         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)
6419                 </oils_persist:source_definition>
6420                 <fields oils_persist:primary="id">
6421                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6422                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6423                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6424                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6425                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6426                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6427                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6428                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6429                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6430                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6431                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6432                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6433                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6434                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6435                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6436                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6437                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6438                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6439                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6440                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6441                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6442                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6443                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6444                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6445                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6446                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6447                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6448                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6449                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6450                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6451                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6452                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6453                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6454                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6455                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6456                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6457                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6458                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6459                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6460                 </fields>
6461                 <links>
6462                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6463                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6464                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6465                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6466                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6467                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6468                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6469                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6470                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6471                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6472                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6473                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6474                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6475                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6476                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6477                 </links>
6478         </class>
6479
6480         <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">
6481                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6482                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6483                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6484                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6485                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6486                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6487                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6488                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6489                 </fields>
6490                 <links>
6491                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6492                 </links>
6493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6494                         <actions>
6495                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6496                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6497                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6498                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6499                         </actions>
6500                 </permacrud>
6501         </class>
6502         <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">
6503                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6504                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6505                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6506                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6507                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6508                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6509                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6510                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6511                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6512                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6513                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6514                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6515                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6516                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6517                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6518                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6519                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6520                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6521                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6522                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6523                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6524                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6525                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6526                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6527                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6528                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6529                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6530                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6531                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6532                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6533                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6534                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6535                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6536                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6537                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6538                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6539                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6540                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6541                 </fields>
6542                 <links>
6543                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6544                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6545                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6546                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6547                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6548                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6549                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6550                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6551                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6552                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6553                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6554                 </links>
6555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6556                         <actions>
6557                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6558                         </actions>
6559                 </permacrud>
6560         </class>
6561         <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">
6562                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6563                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6564                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6565                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6566                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6567                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6568                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6569                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6570                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6571                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6572                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6573                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6574                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6575                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6576                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6577                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6578                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6579                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6580                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6581                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6582                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6583                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6584                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6585                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6586                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6587                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6588                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6589                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6590                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6591                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6592                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6593                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6594                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6595                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6596                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6597                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6598                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6599                 </fields>
6600                 <links>
6601                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6602                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6603                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6604                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6605                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6606                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6607                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6608                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6609                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6610                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6611                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6612                 </links>
6613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6614                         <actions>
6615                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6616                         </actions>
6617                 </permacrud>
6618         </class>
6619
6620         <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">
6621                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6622                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6623                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6624                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6625                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6626                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6627                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6628                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6629                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6630                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6631                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6632                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6633                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6634                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6635                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6636                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6637                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6638                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6639                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6640                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6641                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6642                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6643                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6644                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6645                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6646                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6647                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6648                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6649                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6650                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6651                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6652                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6653                 </fields>
6654                 <links>
6655                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6656                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6657                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6658                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6659                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6660                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6661                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6662                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6663                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6664                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6665                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6666                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6667                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6668                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6669                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6670                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6671                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6672                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6673                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6674                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6675                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6676                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6677                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6678                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6679                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6680                 </links>
6681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6682             <actions>
6683                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6684                 <retrieve />
6685                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6686                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6687             </actions>
6688         </permacrud>
6689         </class>
6690         <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">
6691                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6692                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6693                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6694                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6695                 </fields>
6696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6697                         <actions>
6698                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6699                                 <retrieve/>
6700                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6701                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6702                         </actions>
6703                 </permacrud>
6704         </class>
6705         <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">
6706                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6707                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6708                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6709                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6710                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6711                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6712                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6713                 </fields>
6714                 <links>
6715                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6716                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6717                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6718                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6719                 </links>
6720                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6721                         <actions>
6722                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6723                                 <retrieve/>
6724                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6725                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6726                         </actions>
6727                 </permacrud>
6728         </class>
6729         <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">
6730                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6731                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6732                         <field name="btype" reporter:datatype="text"/>
6733                         <field name="id" reporter:datatype="id" />
6734                         <field name="name"  reporter:datatype="text"/>
6735                         <field name="description" reporter:datatype="text"/>
6736                         <field name="owner" reporter:datatype="link"/>
6737                         <field name="pub" reporter:datatype="bool"/>
6738                         <field name="create_time" reporter:datatype="timestamp" />
6739                         <field name="owning_lib" reporter:datatype="org_unit" />
6740                 </fields>
6741                 <links>
6742                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6743                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6744                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6745                 </links>
6746                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6747                         <actions>
6748                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6749                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6750                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6751                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6752                         </actions>
6753                 </permacrud>
6754         </class>
6755         <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">
6756                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6757                         <field name="id" reporter:datatype="id" />
6758                         <field name="bucket" reporter:datatype="link"/>
6759                         <field name="note" reporter:datatype="text" />
6760                 </fields>
6761                 <links>
6762                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6763                 </links>
6764         </class>
6765         <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">
6766                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6767                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6769                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6770                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6771                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6772                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6773                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6774                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6775                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6776                 </fields>
6777                 <links>
6778                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6779                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6780                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6781                 </links>
6782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6783                         <actions>
6784                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6785                         </actions>
6786                 </permacrud>
6787         </class>
6788         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6789                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6790                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6791                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6792                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6793                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6794                 </fields>
6795                 <links>
6796                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6797                 </links>
6798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6799                         <actions>
6800                                 <retrieve permission="VIEW_USER">
6801                                         <context link="usr" field="home_ou" />
6802                                 </retrieve>
6803                         </actions>
6804                 </permacrud>
6805         </class>
6806     <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">
6807         <fields oils_persist:primary="field">
6808             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6809             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6810             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6811         </fields>
6812         <links/>
6813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6814             <actions>
6815                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6816                 <retrieve />
6817                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6818                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6819             </actions>
6820         </permacrud>
6821     </class>
6822         <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">
6823                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6824                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6825                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6826                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6827                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6828                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6829                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6830                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6831                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6832                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6833                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6834                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6835                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6836                 </fields>
6837                 <links>
6838                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6839                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6840                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6841                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6842                 </links>
6843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6844             <actions>
6845                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6846                 <retrieve />
6847                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6848                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6849             </actions>
6850         </permacrud>
6851         </class>
6852         <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">
6853                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6854                         <field name="field" reporter:datatype="link"/>
6855                         <field name="id" reporter:datatype="id" />
6856                         <field name="source" reporter:datatype="link"/>
6857                         <field name="value"  reporter:datatype="text"/>
6858                 </fields>
6859                 <links>
6860                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6861                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6862                 </links>
6863         </class>
6864         <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">
6865                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6866                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6867                         <field name="btype" reporter:datatype="text"/>
6868                         <field name="id" reporter:datatype="id" />
6869                         <field name="name"  reporter:datatype="text"/>
6870                         <field name="description" reporter:datatype="text"/>
6871                         <field name="owner" reporter:datatype="link"/>
6872                         <field name="pub" reporter:datatype="bool"/>
6873                         <field name="create_time" reporter:datatype="timestamp" />
6874                         <field name="owning_lib" reporter:datatype="org_unit" />
6875                 </fields>
6876                 <links>
6877                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6878                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6879                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6880                 </links>
6881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6882                         <actions>
6883                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6884                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6885                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6886                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6887                         </actions>
6888                 </permacrud>
6889         </class>
6890         <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">
6891                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6892                         <field name="id" reporter:datatype="id" />
6893                         <field name="bucket" reporter:datatype="link"/>
6894                         <field name="note" reporter:datatype="text" />
6895                 </fields>
6896                 <links>
6897                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6898                 </links>
6899         </class>
6900         <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">
6901                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6902                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6903                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6904                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6905                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6906                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6907                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6908                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6909                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6910                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6911                 </fields>
6912                 <links>
6913                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6914                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6915                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6916                 </links>
6917         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6918             <actions>
6919                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6920                     <context link="xact" jump="usr" field="home_ou"/>
6921                 </retrieve>
6922                         </actions>
6923                 </permacrud>
6924         </class>
6925         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6926                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6927                         <field name="id" reporter:datatype="id" />
6928                         <field name="ind1" />
6929                         <field name="ind2" />
6930                         <field name="record" />
6931                         <field name="subfield" />
6932                         <field name="tag" />
6933                         <field name="value" />
6934                 </fields>
6935                 <links>
6936                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6937                 </links>
6938         </class>
6939         <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">
6940                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6941                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6942                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6943                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6944                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6945                 </fields>
6946                 <links>
6947                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6948                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6949                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6950                 </links>
6951         </class>
6952         <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">
6953                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6954                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6955                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6956                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6957                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6958                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6959                 </fields>
6960                 <links>
6961                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6962                 </links>
6963         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6964             <actions>
6965                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6966                 <retrieve/>
6967                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6968                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6969             </actions>
6970         </permacrud>
6971
6972         </class>
6973         <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">
6974                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6975                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6976                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6977                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6978                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6979                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6980                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6981                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6982                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6983                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6984                 </fields>
6985                 <links>
6986                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6987                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6988                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6989                 </links>
6990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6991             <actions>
6992                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6993                 <retrieve/>
6994                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6995                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6996             </actions>
6997         </permacrud>
6998         </class>
6999         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7000                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7001                         <field name="create_date" reporter:datatype="timestamp"/>
7002                         <field name="creator" reporter:datatype="link"/>
7003                         <field name="edit_date" reporter:datatype="timestamp"/>
7004                         <field name="editor" reporter:datatype="link"/>
7005                         <field name="id" reporter:datatype="id" />
7006                         <field name="pub" reporter:datatype="bool"/>
7007                         <field name="record" reporter:datatype="link"/>
7008                         <field name="value"  reporter:datatype="text"/>
7009                 </fields>
7010                 <links>
7011                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7012                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7013                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7014                 </links>
7015         </class>
7016         <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">
7017                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7018                         <field name="balance_owed" reporter:datatype="money" />
7019                         <field name="total_owed" reporter:datatype="money" />
7020                         <field name="total_paid" reporter:datatype="money" />
7021                         <field name="usr" reporter:datatype="link"/>
7022                 </fields>
7023                 <links>
7024                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7025                 </links>
7026         </class>
7027     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7028                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7029                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7030                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7031                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7032                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7033                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7034                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7035                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7036                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7037                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7038                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7039                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7040                 </fields>
7041                 <links>
7042                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7043                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7044                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7045                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7046                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7047                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7048                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7049                 </links>
7050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7051             <actions>
7052                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7053             </actions>
7054         </permacrud>
7055         </class>
7056         <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">
7057                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7058                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7059                         <field name="quality" reporter:datatype="int" />
7060                         <field name="source" reporter:datatype="text"/>
7061                         <field name="transcendant" reporter:datatype="bool"/>
7062                         <field name="can_have_copies" reporter:datatype="bool"/>
7063                 </fields>
7064                 <links/>
7065         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7066             <actions>
7067                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7068                 <retrieve/>
7069                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7070                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7071             </actions>
7072         </permacrud>
7073         </class>
7074         <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">
7075                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7076                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7077                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7078                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7079                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7080                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7081                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7082                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7083                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7084                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7085                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7086                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7087                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7088                 </fields>
7089                 <links>
7090                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7091                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7092                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7093                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7094                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7095                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7096                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7097                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7098                 </links>
7099                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7100                         <actions>
7101                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7102                                         <context link="usr" field="home_ou" />
7103                                 </retrieve>
7104                         </actions>
7105                 </permacrud>
7106         </class>
7107         <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">
7108                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7109                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7110                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7111                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7112                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7113                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7114                 </fields>
7115                 <links>
7116                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7117                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7118                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7119                 </links>
7120         </class>
7121         <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">
7122                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7123                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7124                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7125                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7126                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7127                 </fields>
7128                 <links>
7129                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7130                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7131                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7132                 </links>
7133         </class>
7134         <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">
7135                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7136                         <field name="bucket" reporter:datatype="link"/>
7137                         <field name="id" reporter:datatype="id" />
7138                         <field name="target_user" reporter:datatype="link"/>
7139                         <field name="create_time" reporter:datatype="timestamp" />
7140                         <field name="pos" reporter:datatype="int" />
7141                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7142                 </fields>
7143                 <links>
7144                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7145                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7146             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7147                 </links>
7148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7149                         <actions>
7150                                 <retrieve permission="ADMIN_USER_BUCKET">
7151                     <context link="bucket" owning_lib="owning_lib"/>
7152                 </retrieve>
7153             </actions>
7154         </permacrud>
7155         </class>
7156         <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">
7157                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7158                         <field name="id" reporter:datatype="id" />
7159                         <field name="item" reporter:datatype="link"/>
7160                         <field name="note" reporter:datatype="text" />
7161                 </fields>
7162                 <links>
7163                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7164                 </links>
7165         </class>
7166         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7167                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7168                         <field name="balance_owed" reporter:datatype="money" />
7169                         <field name="total_owed" reporter:datatype="money" />
7170                         <field name="total_paid" reporter:datatype="money" />
7171                         <field name="usr" reporter:datatype="link"/>
7172                 </fields>
7173                 <links>
7174                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7175                 </links>
7176         </class>
7177         <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">
7178                 <fields oils_persist:primary="code" oils_persist:sequence="">
7179                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7180                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7181                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7182                 </fields>
7183                 <links/>
7184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7185             <actions>
7186                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7187                 <retrieve/>
7188                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7189                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7190             </actions>
7191         </permacrud>
7192         </class>
7193         <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">
7194                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7195                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7196                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7197                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7198                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7199                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7200                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7201                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7202                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7203                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7204                 </fields>
7205                 <links>
7206                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7207                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7208                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7209                 </links>
7210         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7211             <actions>
7212                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7213                     <context link="xact" jump="usr" field="home_ou"/>
7214                 </retrieve>
7215                         </actions>
7216                 </permacrud>
7217         </class>
7218         <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">
7219                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7220                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7221                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7222                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7223                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7224                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7225                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7226                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7227                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7228                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7229                 </fields>
7230                 <links>
7231                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7232                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7233                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7234                 </links>
7235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7236             <actions>
7237                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7238                     <context link="xact" jump="usr" field="home_ou"/>
7239                 </retrieve>
7240                         </actions>
7241                 </permacrud>
7242         </class>
7243         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7244                 <fields oils_persist:primary="id" oils_persist:sequence="">
7245                         <field name="checkin_lib" reporter:datatype="link"/>
7246                         <field name="checkin_staff" reporter:datatype="link"/>
7247                         <field name="checkin_time" reporter:datatype="timestamp"/>
7248                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7249                         <field name="circ_staff" reporter:datatype="link"/>
7250                         <field name="desk_renewal" reporter:datatype="bool"/>
7251                         <field name="due_date" reporter:datatype="timestamp"/>
7252                         <field name="duration" reporter:datatype="interval"/>
7253                         <field name="duration_rule" reporter:datatype="link"/>
7254                         <field name="fine_interval" reporter:datatype="interval"/>
7255                         <field name="id" reporter:datatype="id" />
7256                         <field name="max_fine" reporter:datatype="money" />
7257                         <field name="max_fine_rule" reporter:datatype="link"/>
7258                         <field name="opac_renewal" reporter:datatype="bool"/>
7259                         <field name="phone_renewal" reporter:datatype="bool"/>
7260                         <field name="recurring_fine" reporter:datatype="money" />
7261                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7262                         <field name="renewal_remaining" reporter:datatype="int" />
7263             <field name="grace_period" reporter:datatype="interval" />
7264                         <field name="stop_fines" reporter:datatype="text"/>
7265                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7266                         <field name="target_copy" reporter:datatype="link"/>
7267                         <field name="usr" reporter:datatype="link"/>
7268                         <field name="xact_finish" reporter:datatype="timestamp" />
7269                         <field name="xact_start" reporter:datatype="timestamp" />
7270                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7271                 </fields>
7272                 <links>
7273                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7274                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7275                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7276                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7277                 </links>
7278         </class>
7279         <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">
7280                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7281                         <field name="field" reporter:datatype="link"/>
7282                         <field name="id" reporter:datatype="id" />
7283                         <field name="source" reporter:datatype="link"/>
7284                         <field name="value" reporter:datatype="text"/>
7285                 </fields>
7286                 <links>
7287                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7288                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7289                 </links>
7290         </class>
7291         <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">
7292                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7293                         <field name="high" reporter:datatype="money" />
7294                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7295                         <field name="low" reporter:datatype="money" />
7296                         <field name="name" reporter:datatype="text"/>
7297                         <field name="normal" reporter:datatype="money" />
7298                         <field name="recurrence_interval" reporter:datatype="interval"/>
7299             <field name="grace_period" reporter:datatype="interval" />
7300                 </fields>
7301                 <links/>
7302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7303             <actions>
7304                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7305                 <retrieve/>
7306                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7307                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7308             </actions>
7309         </permacrud>
7310         </class>
7311         <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">
7312                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7313                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7314                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7315                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7316                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7317                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7318                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7319                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7320                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7321                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7322                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7323                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7324                 </fields>
7325                 <links>
7326                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7327                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7328                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7329                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7330                 </links>
7331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7332             <actions>
7333                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7334                     <context link="xact" jump="usr" field="home_ou"/>
7335                 </retrieve>
7336                         </actions>
7337                 </permacrud>
7338         </class>
7339         <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">
7340                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7341                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7342                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7343                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7344                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7345                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7346                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7347                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7348                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7349                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7350                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7351                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7352                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7353                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7354                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7355                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7356                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7357                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7358                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7359                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7360                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7361                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7362                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7363                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7364                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7365                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7366                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7367                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7368                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7369                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7370                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7371                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7372                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7373                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7374                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7375                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7376                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7377                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7378                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7379                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7380                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7381                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7382                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7383                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7384                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7385                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7386                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7387                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7388                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7389                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7390                 </fields>
7391                 <links>
7392                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7393                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7394                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7395                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7396                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7397                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7398                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7399                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7400                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7401                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7402                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7403                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7404                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7405                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7406                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7407                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7408                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7409                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7410                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7411                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7412                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7413                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7414                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7415                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7416                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7417                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7418                 </links>
7419         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7420             <actions>
7421                 <create permission="CREATE_COPY">
7422                     <context link="call_number" field="owning_lib"/>
7423                 </create>
7424                 <retrieve/>
7425                 <update permission="UPDATE_COPY">
7426                     <context link="call_number" field="owning_lib"/>
7427                 </update>
7428                 <delete permission="DELETE_COPY">
7429                     <context link="call_number" field="owning_lib"/>
7430                 </delete>
7431             </actions>
7432         </permacrud>
7433         </class>
7434
7435         <class id="ccat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_alert_type" oils_persist:tablename="config.copy_alert_type" reporter:label="Copy Alert Type" oils_persist:restrict_primary="100">
7436                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7437                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7438                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7439                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7440                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7441                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7442                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7443                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7444                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7445                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7446                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7447                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7448                 </fields>
7449                 <links>
7450                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7451                 </links>
7452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7453             <actions>
7454                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7455                 <retrieve/>
7456                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7457                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7458             </actions>
7459         </permacrud>
7460         </class>
7461
7462         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Copy Alert Suppression">
7463                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7464                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7465                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7466                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7467                 </fields>
7468                 <links>
7469                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7470                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7471                 </links>
7472         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7473             <actions>
7474                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7475                 <retrieve/>
7476                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7477                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7478             </actions>
7479         </permacrud>
7480         </class>
7481
7482         <class id="aca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_alert" oils_persist:tablename="asset.copy_alert" reporter:label="Copy Alert">
7483                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7484                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7485                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7486                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7487                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7488                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7489                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7490                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7491                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7492                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7493                 </fields>
7494                 <links>
7495                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7496                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7497                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7498                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7499                 </links>
7500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7501             <actions>
7502                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7503                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7504                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7505                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7506             </actions>
7507         </permacrud>
7508         </class>
7509
7510         <class id="aaca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::active_copy_alert" oils_persist:tablename="asset.active_copy_alert" reporter:label="Active Copy Alert" oils_persist:readonly="true">
7511                 <fields oils_persist:primary="id">
7512                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7513                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7514                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7515                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7516                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7517                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7518                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7519                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7520                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7521                 </fields>
7522                 <links>
7523                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7524                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7525                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7526                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7527                 </links>
7528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7529             <actions>
7530                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7531                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7532                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7533                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7534             </actions>
7535         </permacrud>
7536         </class>
7537
7538         <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">
7539                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7540                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7541                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7542                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7543                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7544                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7545                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7546                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7547                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7548                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7549                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7550                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7551                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7552                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7553                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7554                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7555                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7556                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7557                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7558                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7559                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7560                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7561                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7562                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7563                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7564                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7565                 </fields>
7566                 <links>
7567                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7568                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7569                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7570                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7571                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7572                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7573                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7574                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7575                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7576                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7577                 </links>
7578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7579                         <actions>
7580                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7581                                 <retrieve />
7582                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7583                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7584                         </actions>
7585                 </permacrud>
7586         </class>
7587
7588         <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">
7589                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7590                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7591                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7592                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7593                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7594                 </fields>
7595                 <links/>
7596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7597             <actions>
7598                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7599                 <retrieve/>
7600                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7601                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7602             </actions>
7603         </permacrud>
7604         </class>
7605         <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">
7606                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7607                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7608                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7609                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7610                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7611                 </fields>
7612                 <links/>
7613         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7614             <actions>
7615                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7616                 <retrieve/>
7617                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7618                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7619             </actions>
7620         </permacrud>
7621         </class>
7622         <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">
7623                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7624                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7625                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7626                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7627                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7628                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7629                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7630                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7631                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7632                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7633                 </fields>
7634                 <links>
7635                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7636                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7637                 </links>
7638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7639             <actions>
7640                 <create permission="CREATE_PERM" global_required="true"/>
7641                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7642                 <update permission="UPDATE_PERM" global_required="true"/>
7643                 <delete permission="DELETE_PERM" global_required="true"/>
7644             </actions>
7645         </permacrud>
7646         </class>
7647         <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">
7648                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7649                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7650                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7651                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7652                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7653                 </fields>
7654                 <links>
7655                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7656                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7657                 </links>
7658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7659             <actions>
7660                 <create permission="ADMIN_SURVEY">
7661                     <context link="question" jump="survey" field="owner"/>
7662                 </create>
7663                 <retrieve/>
7664                 <update permission="ADMIN_SURVEY">
7665                     <context link="question" jump="survey" field="owner"/>
7666                 </update>
7667                 <delete permission="ADMIN_SURVEY">
7668                     <context link="question" jump="survey" field="owner"/>
7669                 </delete>
7670             </actions>
7671         </permacrud>
7672         </class>
7673         <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">
7674                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7675                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7676                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7677                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7678                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7679                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7680                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7681                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7682                 </fields>
7683                 <links>
7684                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7685                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7686                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7687                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7688                 </links>
7689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7690                         <actions>
7691                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7692                         </actions>
7693                 </permacrud>
7694         </class>
7695         <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">
7696                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7697                         <field name="balance_owed" reporter:datatype="money" />
7698                         <field name="total_owed" reporter:datatype="money" />
7699                         <field name="total_paid" reporter:datatype="money" />
7700                         <field name="usr" reporter:datatype="link"/>
7701                 </fields>
7702                 <links>
7703                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7704                 </links>
7705         </class>
7706         <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">
7707                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7708                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7709                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7710                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7711                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7712                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7713                 </fields>
7714                 <links>
7715                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7716                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7717                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7718                 </links>
7719         </class>
7720         <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">
7721                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7722                         <field name="field" reporter:datatype="link"/>
7723                         <field name="id" reporter:datatype="id" />
7724                         <field name="source" reporter:datatype="link"/>
7725                         <field name="value" reporter:datatype="text"/>
7726                 </fields>
7727                 <links>
7728                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7729                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7730                 </links>
7731         </class>
7732         <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">
7733                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7734                         <field name="field" reporter:datatype="link"/>
7735                         <field name="id" reporter:datatype="id" />
7736                         <field name="source" reporter:datatype="link"/>
7737                         <field name="value" reporter:datatype="text"/>
7738                 </fields>
7739                 <links>
7740                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7741                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7742                 </links>
7743         </class>
7744         <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">
7745                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7746                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7747                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7748                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7749                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7750                 </fields>
7751                 <links>
7752                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7753                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7754                 </links>
7755         </class>
7756         <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">
7757                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7758                         <field name="depth" reporter:datatype="int" />
7759                         <field name="grantable" reporter:datatype="bool"/>
7760                         <field name="grp" reporter:datatype="link"/>
7761                         <field name="id" reporter:datatype="id" />
7762                         <field name="perm" reporter:datatype="link"/>
7763                 </fields>
7764                 <links>
7765                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7766                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7767                 </links>
7768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7769             <actions>
7770                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7771                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7772                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7773                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7774             </actions>
7775         </permacrud>
7776         </class>
7777         <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">
7778                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7779                         <field name="items" oils_persist:virtual="true" />
7780                         <field name="btype" reporter:datatype="text"/>
7781                         <field name="id" reporter:datatype="id" />
7782                         <field name="name" reporter:datatype="text"/>
7783                         <field name="description" reporter:datatype="text"/>
7784                         <field name="owner" reporter:datatype="link"/>
7785                         <field name="pub" reporter:datatype="bool"/>
7786                         <field name="create_time" reporter:datatype="timestamp" />
7787                         <field name="owning_lib" reporter:datatype="org_unit" />
7788                 </fields>
7789                 <links>
7790                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7791                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7792                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7793                 </links>
7794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7795                         <actions>
7796                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7797                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7798                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7799                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7800                         </actions>
7801                 </permacrud>
7802         </class>
7803         <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">
7804                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7805                         <field name="id" reporter:datatype="id" />
7806                         <field name="bucket" reporter:datatype="link"/>
7807                         <field name="note" reporter:datatype="text" />
7808                 </fields>
7809                 <links>
7810                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7811                 </links>
7812         </class>
7813         <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">
7814                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7815                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7816                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7817                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7818                 </fields>
7819                 <links>
7820                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7821                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7822                 </links>
7823         </class>
7824         <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">
7825                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7826                         <field name="depth" reporter:datatype="int"/>
7827                         <field name="grantable" reporter:datatype="bool"/>
7828                         <field name="id" reporter:datatype="id" />
7829                         <field name="perm" reporter:datatype="link"/>
7830                         <field name="usr" reporter:datatype="link"/>
7831                 </fields>
7832                 <links>
7833                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7834                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7835                 </links>
7836         </class>
7837         <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">
7838                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7839                         <field name="object_id" reporter:datatype="text"/>
7840                         <field name="grantable" reporter:datatype="bool"/>
7841                         <field name="id" reporter:datatype="id" />
7842                         <field name="perm" reporter:datatype="link"/>
7843                         <field name="usr" reporter:datatype="link"/>
7844                         <field name="object_type" reporter:datatype="text"/>
7845                 </fields>
7846                 <links>
7847                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7848                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7849                 </links>
7850         </class>
7851         <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">
7852                 <fields oils_persist:primary="id" oils_persist:sequence="">
7853                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7854                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7855                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7856                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7857                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7858                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7859                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7860                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7861                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7862                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7863                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7864                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7865                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7866                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7867                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7868                 </fields>
7869                 <links>
7870                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7871                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7872                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7873                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7874                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7875                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7876                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7877                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7878                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7879                 </links>
7880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7881             <actions>
7882                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7883                     <context link="xact" jump="usr" field="home_ou"/>
7884                 </retrieve>
7885                         </actions>
7886                 </permacrud>
7887         </class>
7888         <class id="mbp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
7889                 <fields oils_persist:primary="id" oils_persist:sequence="">
7890                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7891                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7892                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7893                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7894                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7895                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7896                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7897                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7898                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7899                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7900                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7901                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7902                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7903                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7904                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7905                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7906                 </fields>
7907                 <links>
7908                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7909                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7910                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7911                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7912                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7913                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7914                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7915                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7916                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7917                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7918                 </links>
7919                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7920                         <actions>
7921                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7922                                         <context link="xact" jump="usr" field="home_ou"/>
7923                                 </retrieve>
7924                         </actions>
7925                 </permacrud>
7926         </class>
7927         <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">
7928                 <fields oils_persist:primary="id" oils_persist:sequence="">
7929                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7930                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7931                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7932                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7933                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7934                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7935                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7936                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7937                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7938                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7939                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7940                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7941                 </fields>
7942                 <links>
7943                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7944                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7945                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7946                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7947                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7948                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7949                 </links>
7950         </class>
7951         <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">
7952                 <fields oils_persist:primary="id" oils_persist:sequence="">
7953                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7954                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7955                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7956                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7957                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7958                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7959                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7960                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7961                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7962                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7963                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7964                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7965                 </fields>
7966                 <links>
7967                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7968                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7969                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7970                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7971                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7972                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7973                 </links>
7974         </class>
7975         <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">
7976                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7977                         <field name="bucket" reporter:datatype="link"/>
7978                         <field name="id" reporter:datatype="id" />
7979                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7980                         <field name="create_time" reporter:datatype="timestamp" />
7981                         <field name="pos" reporter:datatype="int" />
7982                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7983                 </fields>
7984                 <links>
7985                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7986                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7987             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7988                 </links>
7989                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7990                         <actions>
7991                                 <retrieve permission="ADMIN_COPY_BUCKET">
7992                     <context link="bucket" owning_lib="owning_lib"/>
7993                 </retrieve>
7994             </actions>
7995         </permacrud>
7996         </class>
7997         <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">
7998                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7999                         <field name="id" reporter:datatype="id" />
8000                         <field name="item" reporter:datatype="link"/>
8001                         <field name="note" reporter:datatype="text" />
8002                 </fields>
8003                 <links>
8004                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8005                 </links>
8006         </class>
8007         <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">
8008                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8009                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8010                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8011                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8012                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8013                 </fields>
8014                 <links>
8015                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8016                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8017                 </links>
8018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8019                         <actions>
8020                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8021                         </actions>
8022                 </permacrud>
8023         </class>
8024     <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">
8025         <fields oils_persist:primary="field">
8026             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8027             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8028             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8029         </fields>
8030         <links/>
8031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8032             <actions>
8033                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8034                 <retrieve />
8035                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8036                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8037             </actions>
8038         </permacrud>
8039     </class>
8040         <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">
8041                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8042                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8043                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8044                 </fields>
8045                 <links/>
8046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8047             <actions>
8048                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8049                 <retrieve/>
8050                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8051                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8052             </actions>
8053         </permacrud>
8054         </class>
8055
8056
8057         <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">
8058                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8059                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8060                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8061                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8062                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8063                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8064                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8065                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8066                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8067                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8068                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8069                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8070                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8071                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8072                 </fields>
8073                 <links>
8074                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8075                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8076                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8077                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8078                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8079                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8080                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8081                 </links>
8082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8083             <actions>
8084                 <create permission="TRANSIT_COPY">
8085                     <context link="target_copy" field="owner"/>
8086                 </create>
8087                 <retrieve/>
8088                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8089                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8090             </actions>
8091         </permacrud>
8092         </class>
8093         <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">
8094                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8095                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8096                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8097                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8098                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8099                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8100                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8101                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8102                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8103                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8104                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8105                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8106                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8107                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8108                 </fields>
8109                 <links>
8110                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8111                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8112                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8113                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8114                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8115                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8116                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8117                 </links>
8118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8119             <actions>
8120                 <create permission="TRANSIT_COPY" context_field="owner">
8121                     <context link="target_copy" field="circ_lib"/>
8122                 </create>
8123                 <retrieve/>
8124                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8125                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8126             </actions>
8127         </permacrud>
8128         </class>
8129         <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">
8130                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8131                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8132                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8133                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8134                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8135                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8136                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8137                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8138                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8139                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8140                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8141                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8142                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8143                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8144                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8145                 </fields>
8146                 <links>
8147                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8148                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8149                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8150                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8151                 </links>
8152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8153             <actions>
8154                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8155                     <context link="xact" jump="usr" field="home_ou"/>
8156                 </retrieve>
8157                         </actions>
8158                 </permacrud>
8159         </class>
8160         <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">
8161                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8162                         <field name="grp" />
8163                         <field name="id" reporter:datatype="id" />
8164                         <field name="usr" />
8165                 </fields>
8166                 <links>
8167                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8168                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8169                 </links>
8170         </class>
8171         <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">
8172                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8173                         <field name="id" reporter:datatype="id" />
8174                         <field name="fq_field" reporter:datatype="text"/>
8175                         <field name="identity_value" reporter:datatype="text"/>
8176                         <field name="translation" reporter:datatype="text"/>
8177                         <field name="string" reporter:datatype="text"/>
8178                 </fields>
8179                 <links>
8180                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8181                 </links>
8182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8183             <actions>
8184                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8185                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8186                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8187                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8188             </actions>
8189         </permacrud>
8190         </class>
8191         <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">
8192                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8193                         <field name="id" reporter:datatype="id" />
8194                         <field name="fm_class" reporter:datatype="text"/>
8195                         <field name="field" reporter:datatype="text"/>
8196                         <field name="owner" reporter:datatype="org_unit"/>
8197                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8198                 </fields>
8199                 <links>
8200                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8201                 </links>
8202         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8203             <actions>
8204                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8205                 <retrieve/>
8206                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8207                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8208             </actions>
8209         </permacrud>
8210         </class>
8211         <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">
8212                 <fields oils_persist:primary="code">
8213                         <field name="code" reporter:datatype="id" />
8214                         <field name="marc_code" reporter:datatype="text"/>
8215                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8216                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8217                         <field name="rtl" reporter:datatype="bool"/>
8218                 </fields>
8219                 <links/>
8220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8221             <actions>
8222                 <create permission="CREATE_LOCALE" global_required="true"/>
8223                 <retrieve/>
8224                 <update permission="UPDATE_LOCALE" global_required="true"/>
8225                 <delete permission="DELETE_LOCALE" global_required="true"/>
8226             </actions>
8227         </permacrud>
8228         </class>
8229         <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">
8230                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8231                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
8232                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
8233                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
8234             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8235                 </fields>
8236                 <links>
8237                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8238                 </links>
8239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8240             <actions>
8241                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8242                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8243                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8244                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8245             </actions>
8246         </permacrud>
8247         </class>
8248
8249         <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">
8250                 <fields oils_persist:primary="id">
8251                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8252                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8253                 </fields>
8254                 <links/>
8255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8256             <actions>
8257                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8258                 <retrieve/>
8259                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8260                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8261             </actions>
8262         </permacrud>
8263         </class>
8264
8265         <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">
8266                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8267                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8268                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8269                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8270                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8271                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8272                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8273                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8274                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8275                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8276                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8277                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8278                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8279                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8280                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8281                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8282                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8283                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8284                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8285                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8286                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8287                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8288                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8289                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8290                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8291                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8292                 </fields>
8293                 <links>
8294                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8295                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8296                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8297                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8298                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8299                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8300                 </links>
8301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8302             <actions>
8303                 <create permission="user_request.create">
8304                     <context link="usr" field="home_ou"/>
8305                                 </create>
8306                 <retrieve permission="user_request.view">
8307                     <context link="usr" field="home_ou"/>
8308                                 </retrieve>
8309                 <update permission="user_request.update">
8310                     <context link="usr" field="home_ou"/>
8311                                 </update>
8312                 <delete permission="user_request.delete">
8313                     <context link="usr" field="home_ou"/>
8314                                 </delete>
8315             </actions>
8316         </permacrud>
8317         </class>
8318
8319         <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">
8320                 <fields oils_persist:primary="code">
8321                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8322                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8323                 </fields>
8324                 <links/>
8325         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8326             <actions>
8327                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8328                 <retrieve/>
8329                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8330                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8331             </actions>
8332         </permacrud>
8333         </class>
8334
8335         <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">
8336                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8337                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8338                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8339                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8340                         <field reporter:label="Ratio" name="ratio" />
8341                 </fields>
8342                 <links>
8343                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8344                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8345                 </links>
8346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8347                         <actions>
8348                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8349                                 <retrieve/>
8350                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8351                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8352                         </actions>
8353                 </permacrud>
8354         </class>
8355
8356         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8357                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8358                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8359                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8360                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8361                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8362                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8363                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8364                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8365                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8366                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8367                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8368                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8369                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8370                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8371                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8372                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8373                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8374                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8375                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8376                 </fields>
8377                 <links>
8378                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8379                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8380             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8381             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8382                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8383                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8384                 </links>
8385         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8386             <actions>
8387                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8388                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8389                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8390                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8391             </actions>
8392         </permacrud>
8393         </class>
8394
8395         <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">
8396                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8397                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8398                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8399                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8400                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8401                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8402                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8403                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8404                 </fields>
8405                 <links>
8406                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8407                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8408                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8409                 </links>
8410         </class>
8411
8412         <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">
8413                 <fields oils_persist:primary="code">
8414                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8415                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8416                 </fields>
8417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8418             <actions>
8419                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8420                 <retrieve/>
8421                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8422                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8423             </actions>
8424                 </permacrud>
8425         </class>
8426
8427         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8428                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8429                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8430                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8431                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8432                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8433                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8434                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8435                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8436                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8437                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8438                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8439                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8440                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
8441                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8442                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8443                 </fields>
8444                 <links>
8445                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8446                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8447                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8448                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8449                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8450                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8451                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8452                 </links>
8453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8454             <actions>
8455                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8456                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8457                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8458                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8459             </actions>
8460         </permacrud>
8461         </class>
8462
8463         <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">
8464                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8465                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8466                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8467                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8468                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8469                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8470                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8471                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8472                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8473                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8474                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8475                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8476                 </fields>
8477                 <links>
8478                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8479                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8480                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8481                 </links>
8482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8483             <actions>
8484                 <create   permission="ADMIN_INVOICE">
8485                                         <context link="invoice" field="receiver"/>
8486                                 </create>
8487                 <retrieve permission="ADMIN_INVOICE">
8488                                         <context link="invoice" field="receiver"/>
8489                                 </retrieve>
8490                 <update   permission="ADMIN_INVOICE">
8491                                         <context link="invoice" field="receiver"/>
8492                                 </update>
8493                                 <delete   permission="ADMIN_INVOICE">
8494                                         <context link="invoice" field="receiver"/>
8495                                 </delete>
8496             </actions>
8497         </permacrud>
8498         </class>
8499
8500         <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">
8501                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8502                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8503                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8504                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8505                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8506                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8507                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8508                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8509                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8510                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8511                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8512                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8513                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8514                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8515                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8516                 </fields>
8517                 <links>
8518                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8519                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8520                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8521                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8522                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8523                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8524                 </links>
8525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8526             <actions>
8527                 <create   permission="ADMIN_INVOICE">
8528                                         <context link="invoice" field="receiver"/>
8529                                 </create>
8530                 <retrieve permission="ADMIN_INVOICE">
8531                                         <context link="invoice" field="receiver"/>
8532                                 </retrieve>
8533                 <update   permission="ADMIN_INVOICE">
8534                                         <context link="invoice" field="receiver"/>
8535                                 </update>
8536                                 <delete   permission="ADMIN_INVOICE">
8537                                         <context link="invoice" field="receiver"/>
8538                                 </delete>
8539             </actions>
8540         </permacrud>
8541         </class>
8542
8543         <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">
8544                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8545                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8546                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8547                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8548                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8549                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8550                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8551                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8552                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8553                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8554                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8555                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8556                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8557                 </fields>
8558                 <links>
8559                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8560                 </links>
8561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8562             <actions>
8563                 <create permission="ADMIN_PROVIDER">
8564                     <context link="provider" field="owner"/>
8565                 </create>
8566                 <retrieve permission="ADMIN_PROVIDER">
8567                     <context link="provider" field="owner"/>
8568                 </retrieve>
8569                 <update permission="ADMIN_PROVIDER">
8570                     <context link="provider" field="owner"/>
8571                 </update>
8572                 <delete permission="ADMIN_PROVIDER">
8573                     <context link="provider" field="owner"/>
8574                 </delete>
8575             </actions>
8576         </permacrud>
8577         </class>
8578
8579         <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">
8580                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8581                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8582                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8583                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8584                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8585                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8586                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8587         </fields>
8588                 <links>
8589                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8590                 </links>
8591         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8592             <actions>
8593                 <create permission="ADMIN_PROVIDER">
8594                     <context link="provider" field="owner"/>
8595                 </create>
8596                 <retrieve permission="ADMIN_PROVIDER">
8597                     <context link="provider" field="owner"/>
8598                 </retrieve>
8599                 <update permission="ADMIN_PROVIDER">
8600                     <context link="provider" field="owner"/>
8601                 </update>
8602                 <delete permission="ADMIN_PROVIDER">
8603                     <context link="provider" field="owner"/>
8604                 </delete>
8605             </actions>
8606         </permacrud>
8607     </class>
8608         <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">
8609                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8610                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8611                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8612                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8613                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8614                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8615                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8616                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8617                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8618                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8619                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8620                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8621                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8622                 </fields>
8623                 <links>
8624                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8625                 </links>
8626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8627             <actions>
8628                 <create permission="ADMIN_PROVIDER">
8629                     <context link="contact" jump='provider' field="owner"/>
8630                 </create>
8631                 <retrieve permission="ADMIN_PROVIDER">
8632                     <context link="contact" jump='provider' field="owner"/>
8633                 </retrieve>
8634                 <update permission="ADMIN_PROVIDER">
8635                     <context link="contact" jump='provider' field="owner"/>
8636                 </update>
8637                 <delete permission="ADMIN_PROVIDER">
8638                     <context link="contact" jump='provider' field="owner"/>
8639                 </delete>
8640             </actions>
8641         </permacrud>
8642         </class>
8643
8644         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8645                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8646                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8647                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8648                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8649                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8650                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8651                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8652                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8653                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8654                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8655                 </fields>
8656                 <links>
8657                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8658                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8659                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8660                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8661                 </links>
8662         </class>
8663
8664         <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">
8665                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8666                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8667                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8668                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8669                 </fields>
8670                 <links>
8671             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8672                 </links>
8673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8674                         <actions>
8675                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8676                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8677                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8678                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8679                         </actions>
8680                 </permacrud>
8681         </class>
8682
8683         <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">
8684                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8685                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8686                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8687                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8688                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8689                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8690                 </fields>
8691                 <links>
8692                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8693                 </links>
8694                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8695                         <actions>
8696                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8697                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8698                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8699                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8700                         </actions>
8701                 </permacrud>
8702         </class>
8703
8704         <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">
8705                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8706                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8707                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8708                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8709                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8710                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8711                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8712                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8713                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8714                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8715                 </fields>
8716                 <links>
8717                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8718                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8719             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8720             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8721                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8722                 </links>
8723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8724             <actions>
8725                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8726                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8727                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8728                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8729             </actions>
8730         </permacrud>
8731         </class>
8732
8733         <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">
8734                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8735                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8736                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8737                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8738                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8739                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8740                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8741                 </fields>
8742                 <links>
8743                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8744                 </links>
8745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8746                         <actions>
8747                                 <create permission="ADMIN_FUNDING_SOURCE">
8748                     <context link="funding_source" field="owner"/>
8749                 </create>
8750                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8751                     <context link="funding_source" field="owner"/>
8752                 </retrieve>
8753                                 <update permission="ADMIN_FUNDING_SOURCE">
8754                     <context link="funding_source" field="owner"/>
8755                 </update>
8756                                 <delete permission="ADMIN_FUNDING_SOURCE">
8757                     <context link="funding_source" field="owner"/>
8758                 </delete>
8759                         </actions>
8760                 </permacrud>
8761         </class>
8762
8763         <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">
8764                 <fields oils_persist:primary="id">
8765                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8766                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8767                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8768                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8769                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8770                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8771                 </fields>
8772                 <links>
8773                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8774                 </links>
8775         </class>
8776
8777         <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">
8778                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8779                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8780                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8781                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8782                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8783                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8784                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8785                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8786                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8787                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8788                 </fields>
8789                 <links>
8790                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8791                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8792                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8793                 </links>
8794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8795                         <actions>
8796                                 <create permission="ADMIN_ACQ_FUND">
8797                     <context link="fund" field="org"/>
8798                 </create>
8799                                 <retrieve permission="ADMIN_ACQ_FUND">
8800                     <context link="fund" field="org"/>
8801                 </retrieve>
8802                                 <update permission="ADMIN_ACQ_FUND">
8803                     <context link="fund" field="org"/>
8804                 </update>
8805                                 <delete permission="ADMIN_ACQ_FUND">
8806                     <context link="fund" field="org"/>
8807                 </delete>
8808                         </actions>
8809                 </permacrud>
8810         </class>
8811
8812         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8813                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8814                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8815                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8816                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8817                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8818                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8819                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8820                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8821                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8822                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8823                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8824                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8825                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8826                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8827                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8828                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8829                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8830                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8831                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8832                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8833                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8834                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8835                 </fields>
8836                 <links>
8837                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8838                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8839             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8840             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8841             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8842             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8843             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8844             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8845             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8846             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8847             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8848                 </links>
8849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8850             <actions>
8851                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8852                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8853                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8854                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8855             </actions>
8856         </permacrud>
8857         </class>
8858
8859         <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">
8860                 <fields oils_persist:primary="fund">
8861                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8862                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8863                 </fields>
8864                 <links>
8865                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8866                 </links>
8867         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8868             <actions>
8869                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8870                                         <context link="fund" field="org" />
8871                 </retrieve>
8872             </actions>
8873         </permacrud>
8874         </class>
8875
8876         <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">
8877                 <fields oils_persist:primary="fund">
8878                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8879                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8880                 </fields>
8881                 <links>
8882                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8883                 </links>
8884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8885             <actions>
8886                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8887                                         <context link="fund" field="org" />
8888                 </retrieve>
8889             </actions>
8890         </permacrud>
8891         </class>
8892
8893         <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">
8894                 <fields oils_persist:primary="fund">
8895                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8896                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8897                 </fields>
8898                 <links>
8899                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8900                 </links>
8901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8902             <actions>
8903                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8904                                         <context link="fund" field="org" />
8905                 </retrieve>
8906             </actions>
8907         </permacrud>
8908         </class>
8909
8910         <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">
8911                 <fields oils_persist:primary="fund">
8912                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8913                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8914                 </fields>
8915                 <links>
8916                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8917                 </links>
8918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8919             <actions>
8920                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8921                                         <context link="fund" field="org" />
8922                 </retrieve>
8923             </actions>
8924         </permacrud>
8925         </class>
8926
8927         <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">
8928                 <fields oils_persist:primary="fund">
8929                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8930                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8931                 </fields>
8932                 <links>
8933                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8934                 </links>
8935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8936             <actions>
8937                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8938                                         <context link="fund" field="org" />
8939                 </retrieve>
8940             </actions>
8941         </permacrud>
8942         </class>
8943
8944    <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">
8945         <fields oils_persist:primary="fund">
8946             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8947             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8948         </fields>
8949         <links>
8950             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8951         </links>
8952     </class>
8953
8954    <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">
8955         <fields oils_persist:primary="fund">
8956             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8957             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8958         </fields>
8959         <links>
8960             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8961         </links>
8962     </class>
8963
8964    <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">
8965         <fields oils_persist:primary="fund">
8966             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8967             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8968         </fields>
8969         <links>
8970             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8971         </links>
8972     </class>
8973
8974    <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">
8975         <fields oils_persist:primary="fund">
8976             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8977             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8978         </fields>
8979         <links>
8980             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8981         </links>
8982     </class>
8983
8984    <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">
8985         <fields oils_persist:primary="fund">
8986             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8987             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8988         </fields>
8989         <links>
8990             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8991         </links>
8992     </class>
8993
8994         <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">
8995                 <fields oils_persist:primary="funding_source">
8996                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8997                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8998                 </fields>
8999                 <links>
9000                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9001                 </links>
9002         </class>
9003
9004         <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">
9005                 <fields oils_persist:primary="funding_source">
9006                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9007                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9008                 </fields>
9009                 <links>
9010                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9011                 </links>
9012         </class>
9013
9014         <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">
9015                 <fields oils_persist:primary="funding_source">
9016                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9017                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9018                 </fields>
9019                 <links>
9020                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9021                 </links>
9022         </class>
9023
9024         <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">
9025                 <fields oils_persist:primary="fund">
9026                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9027                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9028                 </fields>
9029                 <links>
9030                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9031                 </links>
9032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9033             <actions>
9034                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9035                                         <context link="fund" field="org" />
9036                 </retrieve>
9037             </actions>
9038         </permacrud>
9039     </class>
9040     <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">
9041         <oils_persist:source_definition><![CDATA[
9042             SELECT
9043                 acqf.*,
9044                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9045                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9046                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9047                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9048             FROM
9049                 acq.fund acqf
9050                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9051                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9052                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9053                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9054         ]]></oils_persist:source_definition>
9055         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9056             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9057             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9058             <field reporter:label="Name" name="name" reporter:datatype="text" />
9059             <field reporter:label="Year" name="year" reporter:datatype="int" />
9060             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9061             <field reporter:label="Code" name="code" reporter:datatype="text" />
9062             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9063             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9064             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9065             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9066             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9067
9068             <!-- non fund-native fields -->
9069             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9070             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9071             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9072             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9073         </fields>
9074         <links>
9075             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9076             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9077             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9078         </links>
9079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9080             <actions>
9081                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9082             </actions>
9083         </permacrud>
9084         </class>
9085         <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">
9086                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9087                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9088                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9089                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9090                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9091                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9092                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9093                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9094                 </fields>
9095                 <links>
9096                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9097                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9098                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9099                 </links>
9100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9101                         <actions>
9102                                 <create permission="ADMIN_ACQ_FUND">
9103                     <context link="fund" field="org"/>
9104                 </create>
9105                                 <retrieve permission="ADMIN_ACQ_FUND">
9106                     <context link="fund" field="org"/>
9107                 </retrieve>
9108                                 <update permission="ADMIN_ACQ_FUND">
9109                     <context link="fund" field="org"/>
9110                 </update>
9111                                 <delete permission="ADMIN_ACQ_FUND">
9112                     <context link="fund" field="org"/>
9113                 </delete>
9114                         </actions>
9115                 </permacrud>
9116         </class>
9117
9118     <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">
9119         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9120             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9121             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9122             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9123             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9124             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9125             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9126             <field reporter:label="Note" name="note" reporter:datatype="text" />
9127             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9128         </fields>
9129         <links>
9130             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9131             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9132             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9133         </links>
9134                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9135                         <actions>
9136                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9137                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9138                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9139                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9140                         </actions>
9141                 </permacrud>
9142     </class>
9143
9144         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9145                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9146                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9147                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9148                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9149                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9150                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9151                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9152                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9153                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9154                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9155                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9156                 </fields>
9157                 <links>
9158                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9159                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9160                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9161                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9162                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9163                 </links>
9164                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9165                         <actions>
9166                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9167                         </actions>
9168                 </permacrud>
9169         </class>
9170
9171         <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">
9172                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9173                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9174                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9175                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9176                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9177                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9178                 </fields>
9179                 <links>
9180                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9181                 </links>
9182                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9183                         <actions>
9184                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9185                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9186                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9187                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9188                         </actions>
9189                 </permacrud>
9190         </class>
9191
9192         <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">
9193                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9194                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9195                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9196                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9197                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9198                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9199                         <field reporter:label="State" name="state" reporter:datatype="text" />
9200                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9201                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9202                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9203                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9204                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9205                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9206                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9207                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9208                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9209                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9210                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9211                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9212                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9213                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9214                 </fields>
9215                 <links>
9216                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9217                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9218                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9219                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9220                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9221                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9222                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9223                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9224                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9225                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9226                 </links>
9227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9228                         <actions>
9229                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9230                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9231                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9232                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9233                         </actions>
9234                 </permacrud>
9235         </class>
9236
9237         <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">
9238                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9239                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9240                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9241                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9242                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9243                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9244                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9245                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9246                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9247                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9248                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9249                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9250                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9251                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9252                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9253                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9254                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9255                 </fields>
9256                 <links>
9257                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9258                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9260                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9261                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9262                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9263                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9264                 </links>
9265                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9266             <actions>
9267                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9268             </actions>
9269                 </permacrud>
9270         </class>
9271
9272         <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">
9273                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9274                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9275                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9276                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9277                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9278                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9279                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9280                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9281                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9282                 </fields>
9283                 <links>
9284                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9285                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9286                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9287                 </links>
9288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9289             <actions>
9290                 <create permission="CREATE_PURCHASE_ORDER">
9291                     <context link="purchase_order" field="ordering_agency"/>
9292                 </create>
9293                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9294                     <context link="purchase_order" field="ordering_agency"/>
9295                 </retrieve>
9296                 <update permission="CREATE_PURCHASE_ORDER">
9297                     <context link="purchase_order" field="ordering_agency"/>
9298                 </update>
9299                 <delete permission="CREATE_PURCHASE_ORDER">
9300                     <context link="purchase_order" field="ordering_agency"/>
9301                 </delete>
9302             </actions>
9303                 </permacrud>
9304         </class>
9305
9306         <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">
9307                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9308                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9309                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9310                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9311                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9312                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9313                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9314                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9315                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9316                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9317                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9318                 </fields>
9319                 <links>
9320                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9321                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9322                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9323                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9324                 </links>
9325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9326             <actions>
9327                 <create permission="CREATE_PURCHASE_ORDER">
9328                     <context link="purchase_order" field="ordering_agency"/>
9329                 </create>
9330                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9331                     <context link="purchase_order" field="ordering_agency"/>
9332                 </retrieve>
9333                 <update permission="CREATE_PURCHASE_ORDER">
9334                     <context link="purchase_order" field="ordering_agency"/>
9335                 </update>
9336                 <delete permission="CREATE_PURCHASE_ORDER">
9337                     <context link="purchase_order" field="ordering_agency"/>
9338                 </delete>
9339             </actions>
9340                 </permacrud>
9341         </class>
9342
9343         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9344                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9345                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9346                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9347                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9348                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9349                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9350                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9351                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9352                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9353                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9354                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9355                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9356                         <field reporter:label="State" name="state" reporter:datatype="text" />
9357                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9358                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9359                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9360                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9361                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9362                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9363                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9364                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9365                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9366                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9367                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9368                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9369                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9370                 </fields>
9371                 <links>
9372                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9373                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9374                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9375                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9376                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9377                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9378                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9379                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9380                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9381                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9382                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9383                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9384                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9385                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9386                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9387                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9388                 </links>
9389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9390                         <actions>
9391                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9392                                         <context link="purchase_order" field="ordering_agency"/>
9393                                         <context link="picklist" field="org_unit"/>
9394                                 </retrieve>
9395                         </actions>
9396                 </permacrud>
9397         </class>
9398
9399         <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">
9400                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9401                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9402                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9403                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9404                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9405                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9406                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9407                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9408                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9409                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9410                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9411                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9412                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9413                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9414                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9415                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9416                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9417                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9418                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9419                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9420                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9421                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9422                 </fields>
9423                 <links>
9424                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9425                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9426                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9427                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9428                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9429                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9430                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9431                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9432                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9433                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9434                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9435                 </links>
9436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9437                         <actions>
9438                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9439                                         <context link="purchase_order" field="ordering_agency"/>
9440                                         <context link="picklist" field="org_unit"/>
9441                                 </retrieve>
9442                         </actions>
9443                 </permacrud>
9444         </class>
9445
9446         <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">
9447                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9448                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9449                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9450                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9451                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9452                 </fields>
9453                 <links>
9454                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9455                 </links>
9456                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9457                         <actions>
9458                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9459                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9460                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9461                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9462                         </actions>
9463                 </permacrud>
9464         </class>
9465
9466         <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">
9467                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9468                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9469                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9470                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9471                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9472                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9473                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9474                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9475                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9476                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9477                 </fields>
9478                 <links>
9479                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9480                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9481                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9482                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9483                 </links>
9484         </class>
9485
9486         <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">
9487                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9488                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9489                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9490                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9491                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9492                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9493                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9494                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9495                 </fields>
9496                 <links>
9497                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9498                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9499                 </links>
9500         </class>
9501
9502         <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">
9503                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9504                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9505                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9506                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9507                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9508                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9509                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9510                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9511                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9512                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9513                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9514                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9515                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9516                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9517                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9518                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9519                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9520                 </fields>
9521                 <links>
9522                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9523                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9524                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9525                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9526                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9527                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9528                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9529                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9530                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9531                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9532                 </links>
9533         </class>
9534
9535         <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">
9536                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9537                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9538                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9539                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9540                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9541                 </fields>
9542                 <links/>
9543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9544                         <actions>
9545                                 <retrieve />
9546                         </actions>
9547                 </permacrud>
9548         </class>
9549
9550         <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">
9551                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9552                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9553                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9554                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9555                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9556                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9557             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9558                 </fields>
9559                 <links/>
9560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9561             <actions>
9562                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9563                 <retrieve />
9564                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9565                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9566             </actions>
9567         </permacrud>
9568         </class>
9569
9570         <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">
9571                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9572                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9573                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9574                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9575                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9576                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9577                 </fields>
9578                 <links/>
9579         </class>
9580         <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">
9581                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9582                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9583                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9584                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9585                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9586                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9587                 </fields>
9588                 <links>
9589                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9590                 </links>
9591         </class>
9592
9593         <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">
9594             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9595                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9596                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9597                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9598                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9599                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9600                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9601         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9602
9603             </fields>
9604             <links>
9605                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9606             </links>
9607             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9608                 <actions>
9609                     <create permission="ADMIN_PROVIDER">
9610                         <context link="provider" field="owner"/>
9611                     </create>
9612                     <retrieve permission="ADMIN_PROVIDER">
9613                         <context link="provider" field="owner"/>
9614                     </retrieve>
9615                     <update permission="ADMIN_PROVIDER">
9616                         <context link="provider" field="owner"/>
9617                     </update>
9618                     <delete permission="ADMIN_PROVIDER">
9619                         <context link="provider" field="owner"/>
9620                     </delete>
9621                 </actions>
9622             </permacrud>
9623         </class>
9624         
9625         <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">
9626             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9627                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9628                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9629                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9630                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9631             </fields>
9632             <links>
9633                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9634             </links>
9635             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9636                 <actions>
9637                     <create permission="ADMIN_PROVIDER">
9638                         <context link="provider" field="owner"/>
9639                     </create>
9640                     <retrieve permission="ADMIN_PROVIDER">
9641                         <context link="provider" field="owner"/>
9642                     </retrieve>
9643                     <update permission="ADMIN_PROVIDER">
9644                         <context link="provider" field="owner"/>
9645                     </update>
9646                     <delete permission="ADMIN_PROVIDER">
9647                         <context link="provider" field="owner"/>
9648                     </delete>
9649                 </actions>
9650             </permacrud>
9651         </class>
9652         
9653         <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">
9654             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9655                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9656                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9657                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9658                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9659                 </fields>
9660                 <links/>
9661         </class>
9662
9663         <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">
9664                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9665                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9666                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9667                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9668                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9669                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9670                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9671                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9672                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9673                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9674                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9675                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9676                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9677                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9678                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9679                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9680                 </fields>
9681                 <links>
9682                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9683                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9684                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9685                 </links>
9686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9687             <actions>
9688                 <create permission="ADMIN_PROVIDER">
9689                     <context link="provider" field="owner"/>
9690                 </create>
9691                 <retrieve permission="ADMIN_PROVIDER">
9692                     <context link="provider" field="owner"/>
9693                 </retrieve>
9694                 <update permission="ADMIN_PROVIDER">
9695                     <context link="provider" field="owner"/>
9696                 </update>
9697                 <delete permission="ADMIN_PROVIDER">
9698                     <context link="provider" field="owner"/>
9699                 </delete>
9700             </actions>
9701         </permacrud>
9702         </class>
9703
9704         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9705                 oils_obj:fieldmapper="acq::edi_attr" 
9706                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9707                 <fields oils_persist:primary="key">
9708                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9709                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9710                 </fields>
9711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9712             <actions>
9713                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9714                 <retrieve/>
9715                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9716                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9717             </actions>
9718         </permacrud>
9719         </class>
9720         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9721                 oils_obj:fieldmapper="acq::edi_attr_set" 
9722                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9723                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9724                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9725                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9726                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9727                 </fields>
9728                 <links>
9729                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9730                 </links>
9731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9732             <actions>
9733                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9734                 <retrieve/>
9735                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9736                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9737             </actions>
9738         </permacrud>
9739         </class>
9740         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9741                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9742                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9743                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9744                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9745                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9746                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9747                 </fields>
9748                 <links>
9749                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9750                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9751                 </links>
9752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9753             <actions>
9754                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9755                 <retrieve/>
9756                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9757                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9758             </actions>
9759         </permacrud>
9760         </class>
9761
9762
9763         <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">
9764                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9765                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9766                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9767                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9768                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9769                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9770                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9771                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9772                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9773                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9774                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9775                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9776                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9777                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9778                 </fields>
9779                 <links>
9780                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9781                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9782                 </links>
9783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9784             <actions>
9785                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9786                     <context link="account" jump="provider" field="owner"/>
9787                 </retrieve>
9788                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9789                     <context link="account" jump="provider" field="owner"/>
9790                 </update>
9791                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9792                     <context link="account" jump="provider" field="owner"/>
9793                 </delete>
9794             </actions>
9795         </permacrud>
9796         </class>
9797
9798
9799         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9800                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9801                         <field name="id" reporter:datatype="id" />
9802                         <field name="parent" reporter:datatype="link"/>
9803                         <field name="owner" reporter:datatype="link"/>
9804                         <field name="create_time" reporter:datatype="timestamp"/>
9805                         <field name="name" reporter:datatype="text"/>
9806                         <field name="shared" reporter:datatype="bool"/>
9807                         <field name="share_with" reporter:datatype="link"/>
9808                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9809                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9810                 </fields>
9811                 <links>
9812                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9813                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9814                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9815                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9816                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9817                 </links>
9818         </class>
9819         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9820                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9821                         <field name="id" reporter:datatype="id" />
9822                         <field name="parent" reporter:datatype="link"/>
9823                         <field name="owner" reporter:datatype="link"/>
9824                         <field name="create_time" reporter:datatype="timestamp"/>
9825                         <field name="name" reporter:datatype="text"/>
9826                         <field name="shared" reporter:datatype="bool"/>
9827                         <field name="share_with" reporter:datatype="link"/>
9828                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9829                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9830                 </fields>
9831                 <links>
9832                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9833                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9834                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9835                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9836                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9837                 </links>
9838         </class>
9839         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9840                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9841                         <field name="id" reporter:datatype="id" />
9842                         <field name="parent" reporter:datatype="link"/>
9843                         <field name="owner" reporter:datatype="link"/>
9844                         <field name="create_time" reporter:datatype="timestamp"/>
9845                         <field name="name" reporter:datatype="text"/>
9846                         <field name="shared" reporter:datatype="bool"/>
9847                         <field name="share_with" reporter:datatype="link"/>
9848                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9849                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9850                 </fields>
9851                 <links>
9852                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9853                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9854                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9855                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9856                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9857                 </links>
9858         </class>
9859         <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">
9860                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9861                         <field name="id" reporter:datatype="id" />
9862                         <field name="owner" reporter:datatype="link"/>
9863                         <field name="create_time" reporter:datatype="timestamp"/>
9864                         <field name="name" reporter:datatype="text"/>
9865                         <field name="data" reporter:datatype="text"/>
9866                         <field name="folder" reporter:datatype="link"/>
9867                         <field name="description" reporter:datatype="text"/>
9868                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9869                 </fields>
9870                 <links>
9871                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9872                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9873                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9874                 </links>
9875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9876             <actions>
9877                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9878                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9879                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9880                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9881             </actions>
9882         </permacrud>
9883         </class>
9884         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9885                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9886                         <field name="id" reporter:datatype="id" />
9887                         <field name="owner" reporter:datatype="link"/>
9888                         <field name="create_time" reporter:datatype="timestamp"/>
9889                         <field name="template" reporter:datatype="link"/>
9890                         <field name="data" reporter:datatype="text"/>
9891                         <field name="folder" reporter:datatype="link"/>
9892                         <field name="recur" reporter:datatype="bool"/>
9893                         <field name="recurrence" reporter:datatype="interval"/>
9894                         <field name="name" reporter:datatype="text"/>
9895                         <field name="description" reporter:datatype="text"/>
9896                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9897                 </fields>
9898                 <links>
9899                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9900                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9901                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9902                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9903                 </links>
9904         </class>
9905         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9906                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9907                         <field name="id" reporter:datatype="id" />
9908                         <field name="runner" reporter:datatype="link"/>
9909                         <field name="start_time" reporter:datatype="timestamp"/>
9910                         <field name="complete_time" reporter:datatype="timestamp"/>
9911                         <field name="run_time" reporter:datatype="timestamp"/>
9912                         <field name="email" reporter:datatype="text"/>
9913                         <field name="excel_format" reporter:datatype="bool"/>
9914                         <field name="csv_format" reporter:datatype="bool"/>
9915                         <field name="html_format" reporter:datatype="bool"/>
9916                         <field name="error_code" reporter:datatype="int"/>
9917                         <field name="error_text" reporter:datatype="text"/>
9918                         <field name="report" reporter:datatype="link"/>
9919                         <field name="folder" reporter:datatype="link"/>
9920                         <field name="chart_pie" reporter:datatype="bool"/>
9921                         <field name="chart_bar" reporter:datatype="bool"/>
9922                         <field name="chart_line" reporter:datatype="bool"/>
9923                 </fields>
9924                 <links>
9925                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9926                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9927                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9928                 </links>
9929         </class>
9930         <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">
9931                 <fields oils_persist:primary="id">
9932                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9933                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9934                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9935                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9936                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9937                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9938                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9939                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9940                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9941                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9942                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9943                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9944                 </fields>
9945                 <links>
9946                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9947                 </links>
9948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9949                         <actions>
9950                                 <retrieve />
9951                         </actions>
9952                 </permacrud>
9953         </class>
9954         <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">
9955                 <fields oils_persist:primary="id">
9956                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9957                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9958                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9959                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9960                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9961                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9962                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9963                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9964                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9965                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9966                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9967                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9968                 </fields>
9969                 <links>
9970                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9971                 </links>
9972         </class>
9973         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9974                 <fields oils_persist:primary="id">
9975                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9976                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9977                         <field reporter:label="Fingerprint" name="fingerprint" />
9978                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9979                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9980                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9981                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9982                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9983                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9984                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9985                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9986                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9987                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9988                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9989                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9990                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9991                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9992                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9993                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9994                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9995                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9996                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9997                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9998                 </fields>
9999                 <links>
10000                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10001                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10002                 </links>
10003         </class>
10004         <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">
10005                 <fields oils_persist:primary="id">
10006                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10007                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10008                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10009                 </fields>
10010                 <links>
10011                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10012                 </links>
10013         </class>
10014         <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">
10015                 <fields oils_persist:primary="id">
10016                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10017                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10018                 </fields>
10019                 <links>
10020                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10021                 </links>
10022         </class>
10023         <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">
10024                 <fields oils_persist:primary="id">
10025                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10026                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10027                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10028                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10029                 </fields>
10030                 <links>
10031                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10032                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10033                 </links>
10034         </class>
10035         <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">
10036                 <fields oils_persist:primary="xact">
10037                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10038                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
10039                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10040                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10041                 </fields>
10042                 <links>
10043                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10044                 </links>
10045         </class>
10046         <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">
10047                 <fields oils_persist:primary="xact">
10048                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10049                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
10050                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10051                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10052                 </fields>
10053                 <links>
10054                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10055                 </links>
10056         </class>
10057         <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)">
10058                 <fields oils_persist:primary="id">
10059                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10060                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10061                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10062                 </fields>
10063                 <links>
10064                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10065                 </links>
10066         </class>
10067         <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">
10068                 <fields oils_persist:primary="id">
10069                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10070                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10071                 </fields>
10072                 <links>
10073                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10074                 </links>
10075         </class>
10076         <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">
10077                 <fields oils_persist:primary="bibid">
10078                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10079                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10080                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10081                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10082                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10083                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10084                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10085                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10086                 </fields>
10087                 <links>
10088                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10089                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10090                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10091                 </links>
10092         </class>
10093         <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">
10094                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10095                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10096                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10097                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10098                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10099                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10100                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10101                 </fields>
10102                 <links>
10103                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10104                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10105                 </links>
10106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10107                         <actions>
10108                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10109                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10110                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10111                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10112                         </actions>
10113                 </permacrud>
10114         </class>
10115         <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">
10116                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10117                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10118                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10119                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10120                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10121                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10122                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10123                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10124                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10125                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10126                 </fields>
10127                 <links>
10128                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10129                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10130                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10131                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10132                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10133                 </links>
10134                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10135                         <actions>
10136                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10137                                         <context link="formula" field="owner"/>
10138                                 </create>
10139                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10140                                         <context link="formula" field="owner"/>
10141                                 </retrieve>
10142                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10143                                         <context link="formula" field="owner"/>
10144                                 </update>
10145                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10146                                         <context link="formula" field="owner"/>
10147                                 </delete>
10148                         </actions>
10149                 </permacrud>
10150         </class>
10151
10152         <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">
10153                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10154                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10155                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10156                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10157                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10158                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10159                 </fields>
10160                 <links>
10161                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10162                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10163                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10164                 </links>
10165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10166                         <actions>
10167                                 <create permission="CREATE_PURCHASE_ORDER">
10168                                         <context link="formula" field="owner"/>
10169                 </create>
10170                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10171                                         <context link="formula" field="owner"/>
10172                 </retrieve>
10173                                 <update permission="CREATE_PURCHASE_ORDER">
10174                                         <context link="formula" field="owner"/>
10175                 </update>
10176                                 <delete permission="CREATE_PURCHASE_ORDER">
10177                                         <context link="formula" field="owner"/>
10178                 </delete>
10179                         </actions>
10180                 </permacrud>
10181         </class>
10182
10183         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10184                 <fields oils_persist:primary="id">
10185                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10186                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10187                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10188                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10189                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10190                 </fields>
10191                 <links>
10192                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10193                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10194                 </links>
10195         </class>
10196
10197         <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">
10198                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10199                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10200                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10201                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10202                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10203                 </fields>
10204                 <links>
10205                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10206                 </links>
10207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10208                         <actions>
10209                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10210                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10211                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10212                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10213                         </actions>
10214                 </permacrud>
10215         </class>
10216
10217         <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">
10218                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10219                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10220                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10221                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10222                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10223                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10224                 </fields>
10225                 <links>
10226                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10227                 </links>
10228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10229                         <actions>
10230                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10231                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10232                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10233                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10234                         </actions>
10235                 </permacrud>
10236         </class>
10237
10238         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10239                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10240                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10241                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10242                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10243                 </fields>
10244                 <links>
10245                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10246                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10247                 </links>
10248         </class>
10249
10250         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10251                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10252                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10253                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10254                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10255                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10256                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10257                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10258                 </fields>
10259                 <links>
10260                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10261                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10262                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10263                 </links>
10264         </class>
10265
10266         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10267                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10268                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10269                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10270                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10271                 </fields>
10272                 <links>
10273                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10274                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10275                 </links>
10276         </class>
10277
10278         <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">
10279                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10280                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10281                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10282                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10283                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10284                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10285                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10286                 </fields>
10287                 <links>
10288                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10289                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10290                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10291                 </links>
10292         </class>
10293
10294         <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">
10295                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10296                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10297                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10298                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10299                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10300                 </fields>
10301                 <links>
10302                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10303                 </links>
10304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10305             <actions>
10306                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10307                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10308                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10309                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10310             </actions>
10311                 </permacrud>
10312         </class>
10313
10314         <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">
10315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10316                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10317                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10318                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10319                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10320                 </fields>
10321                 <links>
10322                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10323                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10324                 </links>
10325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10326                         <actions>
10327                                 <create permission="ADMIN_CLAIM_POLICY">
10328                                         <context link="claim_policy" field="org_unit"/>
10329                 </create>
10330                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10331                                         <context link="claim_policy" field="org_unit"/>
10332                 </retrieve>
10333                                 <update permission="ADMIN_CLAIM_POLICY">
10334                                         <context link="claim_policy" field="org_unit"/>
10335                 </update>
10336                                 <delete permission="ADMIN_CLAIM_POLICY">
10337                                         <context link="claim_policy" field="org_unit"/>
10338                 </delete>
10339                         </actions>
10340                 </permacrud>
10341         </class>
10342
10343     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10344         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10345             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10346             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10347             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10348             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10349             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10350             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10351             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10352             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10353             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10354             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10355             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10356             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10357             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10358             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10359             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10360             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10361         </fields>
10362         <links>
10363             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10364         </links>
10365     </class>
10366
10367     <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">
10368         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10369             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10370             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10371             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10372             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10373             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10374         </fields>
10375     </class>
10376
10377     <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">
10378         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10379             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10380             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10381             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10382             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10383             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10384             <field reporter:label="City" name="city" reporter:datatype="text"/>
10385             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10386             <field reporter:label="State" name="state" reporter:datatype="text"/>
10387             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10388             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10389             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10390         </fields>
10391     </class>
10392
10393     <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">
10394         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10395             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10396             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10397             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10398             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10399             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10400             <field reporter:label="City" name="city" reporter:datatype="text"/>
10401             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10402             <field reporter:label="State" name="state" reporter:datatype="text"/>
10403             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10404             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10405             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10406         </fields>
10407     </class>
10408
10409     <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">
10410         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10411             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10412             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10413             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10414             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10415             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10416             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10417         </fields>
10418     </class>
10419
10420     <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">
10421         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10422             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10423             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10424             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10425             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10426             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10427             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10428         </fields>
10429     </class>
10430
10431         <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">
10432                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10433                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10434                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10435                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10436                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10437                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10438                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10439                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10440                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10441                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10442                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10443                 </fields>
10444                 <links>
10445                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10446                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10447                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10448                 </links>
10449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10450                         <actions>
10451                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10452                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10453                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10454                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10455                         </actions>
10456                 </permacrud>
10457         </class>
10458
10459         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10460                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10461                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10463                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10464                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10465                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10466                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10467                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10468                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10469                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10470                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10471                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10472                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10473                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10474                 </fields>
10475                 <links>
10476                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10477                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10478                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10479                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10480                 </links>
10481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10482                         <actions>
10483                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10484                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10485                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10486                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10487                         </actions>
10488                 </permacrud>
10489         </class>
10490
10491         <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">
10492                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10493                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10494                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10495                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10496                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10497                 </fields>
10498                 <links>
10499                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10500                 </links>
10501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10502                         <actions>
10503                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10504                     <context link="fieldset" field="owning_lib"/>
10505                 </create>
10506                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10507                     <context link="fieldset" field="owning_lib"/>
10508                 </retrieve>
10509                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10510                     <context link="fieldset" field="owning_lib"/>
10511                 </update>
10512                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10513                     <context link="fieldset" field="owning_lib"/>
10514                 </delete>
10515                         </actions>
10516                 </permacrud>
10517         </class>
10518
10519     <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">
10520         <fields>
10521             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10522             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10523             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10524         </fields>
10525                 <links>
10526                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10527                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10528                 </links>
10529     </class>
10530
10531     <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">
10532         <fields>
10533             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10534             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10535         </fields>
10536                 <links>
10537                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10538                 </links>
10539     </class>
10540
10541     <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">
10542         <fields>
10543             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10544             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10545             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10546         </fields>
10547                 <links>
10548                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10549                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10550                 </links>
10551     </class>
10552
10553     <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">
10554         <fields>
10555             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10556             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10557         </fields>
10558                 <links>
10559                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10560                 </links>
10561     </class>
10562
10563     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10564                 <oils_persist:source_definition>
10565
10566             SELECT  DISTINCT l.*
10567               FROM  action.unfulfilled_hold_loops l
10568                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10569               WHERE l.count = m.max
10570
10571                 </oils_persist:source_definition>
10572         <fields>
10573             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10574             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10575             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10576         </fields>
10577                 <links>
10578                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10579                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10580                 </links>
10581     </class>
10582
10583         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10584                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10585                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10586                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10587                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10588                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10589                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10590                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10591                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10592                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10593                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10594                 </fields>
10595                 <links>
10596                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10597                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10598                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10599                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10600                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10601                 </links>
10602         </class>
10603
10604         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10605                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10606                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10607                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10608                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10609                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10610                 </fields>
10611                 <links>
10612                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10613                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10614                 </links>
10615         </class>
10616
10617         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10618                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10619                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10620                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10621                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10622                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10623                 </fields>
10624                 <links>
10625                 </links>
10626         </class>
10627
10628         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10629                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10630                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10631                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10632                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10633                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10634                 </fields>
10635                 <links>
10636                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10637                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10638                 </links>
10639         </class>
10640         
10641         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10642                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10643                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10644                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10645                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10646                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10647                 </fields>
10648                 <links>
10649                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10650                 </links>
10651         </class>
10652         
10653         <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">
10654                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10655                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10656                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10657                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10658                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10659                 </fields>
10660                 <links>
10661                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10662                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10663                 </links>
10664         </class>
10665
10666         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10667                 <fields oils_persist:primary="name">
10668                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10669                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10670                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10671                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10672                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10673                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10674                 </fields>
10675                 <links>
10676                 </links>
10677         </class>
10678
10679         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10680                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10681                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10682                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10683                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10684                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10685                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10686                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10687                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10688                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10689                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10690                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10691                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10692                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10693                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10694                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10695                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10696                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10697                 </fields>
10698                 <links>
10699                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10700                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10701                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10702                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10703                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10704                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10705                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10706                 </links>
10707         </class>
10708
10709         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10710                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10711                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10712                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10713                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10714                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10715                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10716                 </fields>
10717                 <links>
10718                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10719                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10720                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10721                 </links>
10722         </class>
10723
10724         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10725                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10726                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10727                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10728                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10729                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10730                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10731                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10732                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10733                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10734                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10735                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10736                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10737                 </fields>
10738                 <links>
10739                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10740                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10741                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10742                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10743                 </links>
10744         </class>
10745
10746         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10747                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10748                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10749                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10750                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10751                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10752                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10753                 </fields>
10754                 <links>
10755                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10756                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10757                 </links>
10758         </class>
10759
10760         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10761                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10762                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10763                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10764                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10765                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10766                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10767                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10768                 </fields>
10769                 <links>
10770                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10771                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10772                 </links>
10773         </class>
10774
10775         <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">
10776                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10777                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10778                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10779                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10780                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10781                 </fields>
10782                 <links>
10783                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10784                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10785                 </links>
10786         </class>
10787
10788         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10789                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10790                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10791                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10792                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10793                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10794                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10795                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10796                 </fields>
10797                 <links>
10798                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10799                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10800                 </links>
10801         </class>
10802
10803         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10804                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10805                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10806                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10807                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10808                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10809                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10810                 </fields>
10811                 <links>
10812                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10813                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10814                 </links>
10815         </class>
10816
10817         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10818                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10819                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10820                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10821                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10822                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10823                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10824                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10825                 </fields>
10826                 <links>
10827                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10828                 </links>
10829         </class>
10830
10831         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10832                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10833                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10834                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10835                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10836                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10837                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10838                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10839                 </fields>
10840                 <links>
10841                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10842                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10843                 </links>
10844         </class>
10845
10846         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10847                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10848                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10849                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10850                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10851                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10852                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10853                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10854                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10855                 </fields>
10856                 <links>
10857                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10858                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10859                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10860                 </links>
10861         </class>
10862
10863         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10864                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10865                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10866                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10867                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10868                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10869                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10870                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10871                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10872                 </fields>
10873                 <links>
10874                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10875                 </links>
10876         </class>
10877
10878         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10879                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10880                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10881                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10882                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10883                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10884                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10885                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10886                 </fields>
10887                 <links>
10888                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10889                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10890                 </links>
10891         </class>
10892
10893         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10894                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10895                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10896                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10897                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10898                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10899                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10900                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10901                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10902                 </fields>
10903                 <links>
10904                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10905                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10906                 </links>
10907         </class>
10908
10909         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10910                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10911                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10912                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10913                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10914                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10915                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10916                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10917                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10918                 </fields>
10919                 <links>
10920                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10921                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10922                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10923                 </links>
10924         </class>
10925
10926         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10927                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10928                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10929                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10930                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10931                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10932                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10933                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10934                 </fields>
10935                 <links>
10936                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10937                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10938                 </links>
10939         </class>
10940
10941         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10942                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10943                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10944                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10945                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10946                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10947                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10948                 </fields>
10949                 <links>
10950                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10951                 </links>
10952         </class>
10953
10954         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10955                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10956                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10957                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10958                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10959                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10960                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10961                 </fields>
10962                 <links>
10963                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10964                 </links>
10965         </class>
10966
10967         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10968                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10969                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10970                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10971                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10972                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10973                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10974                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10975                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10976                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10977                 </fields>
10978                 <links>
10979                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10980                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10981                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10982                 </links>
10983         </class>
10984
10985         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10986                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10987                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10988                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10989                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10990                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10991                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10992                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10993                 </fields>
10994                 <links>
10995                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10996                 </links>
10997         </class>
10998
10999         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11000                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11001                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11002                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11003                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11004                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11005                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11006                 </fields>
11007                 <links>
11008                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11009                 </links>
11010         </class>
11011
11012         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11013                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11014                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11015                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11016                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11017                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11018                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11019                 </fields>
11020                 <links>
11021                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11022                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11023                 </links>
11024         </class>
11025
11026         <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">
11027                 <fields oils_persist:primary="id">
11028                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11029                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11030                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11031                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11032                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11033                 </fields>
11034                 <links>
11035                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11036                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11037                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11038                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11039                 </links>
11040         </class>
11041
11042         <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">
11043                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11044                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11045                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11046                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11047                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11048                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11049                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11050                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11051                 </fields>
11052                 <links/>
11053                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11054                         <actions>
11055                                 <retrieve/>
11056                         </actions>
11057                 </permacrud>
11058         </class>
11059
11060         <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">
11061                 <fields oils_persist:primary="ptype_key">
11062                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11063                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11064                 </fields>
11065                 <links/>
11066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11067                         <actions>
11068                                 <retrieve/>
11069                         </actions>
11070                 </permacrud>
11071         </class>
11072
11073         <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">
11074                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11075                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11076                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11077                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11078                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11079                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11080                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11081                 </fields>
11082                 <links>
11083                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11084                 </links>
11085                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11086                         <actions>
11087                                 <retrieve/>
11088                         </actions>
11089                 </permacrud>
11090         </class>
11091
11092         <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">
11093                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11094                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11095                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11096                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11097                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11098                 </fields>
11099                 <links>
11100                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11101                 </links>
11102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11103                         <actions>
11104                                 <retrieve/>
11105                         </actions>
11106                 </permacrud>
11107         </class>
11108
11109     <class
11110         id="uvs"
11111         controller="open-ils.cstore open-ils.pcrud"
11112         oils_obj:fieldmapper="url_verify::session"
11113         oils_persist:tablename="url_verify.session"
11114         reporter:label="URL Verification Session"
11115     >
11116         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11117             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11118             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11119                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11120             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11121             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11122             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11123             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11124             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11125             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11126         </fields>
11127
11128         <links>
11129             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11130             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11131             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11132             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11133             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11134         </links>
11135
11136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11137             <actions>
11138                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11139             </actions>
11140         </permacrud>
11141
11142     </class>
11143
11144     <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">
11145         <oils_persist:source_definition>
11146             SELECT
11147                 cbrebi.id AS id,  -- so we can have a pkey in our view
11148                 uvs.id AS session,
11149                 uvs.owning_lib,
11150                 cbrebi.target_biblio_record_entry
11151             FROM url_verify.session uvs
11152             JOIN container.biblio_record_entry_bucket cbreb
11153                 ON (uvs.container = cbreb.id)
11154             JOIN container.biblio_record_entry_bucket_item cbrebi
11155                 ON (cbrebi.bucket = cbreb.id)
11156         </oils_persist:source_definition>
11157         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11158             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11159             <field reporter:label="Session" name="session" reporter:datatype="link" />
11160             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11161             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11162         </fields>
11163         <links>
11164             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11165             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11166             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11167         </links>
11168         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11169             <actions>
11170                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11171             </actions>
11172         </permacrud>
11173     </class>
11174
11175     <class
11176         id="uvus"
11177         controller="open-ils.cstore open-ils.pcrud"
11178         oils_obj:fieldmapper="url_verify::url_selector"
11179         oils_persist:tablename="url_verify.url_selector"
11180         reporter:label="URL Verification URL Selector"
11181     >
11182         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11183             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11184             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11185                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11186             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11187         </fields>
11188
11189         <links>
11190             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11191             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11192         </links>
11193
11194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11195             <actions>
11196                 <create permission="URL_VERIFY">
11197                     <context link="session" field="owning_lib"/>
11198                 </create>
11199                 <retrieve permission="URL_VERIFY">
11200                     <context link="session" field="owning_lib"/>
11201                 </retrieve>
11202                 <update permission="URL_VERIFY">
11203                     <context link="session" field="owning_lib"/>
11204                 </update>
11205                 <delete permission="URL_VERIFY">
11206                     <context link="session" field="owning_lib"/>
11207                 </delete>
11208             </actions>
11209         </permacrud>
11210
11211     </class>
11212
11213     <class
11214         id="uvu"
11215         controller="open-ils.cstore open-ils.pcrud"
11216         oils_obj:fieldmapper="url_verify::url"
11217         oils_persist:tablename="url_verify.url"
11218         reporter:label="URL Verification URL"
11219     >
11220         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11221             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11222                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11223                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11224                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11225                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11226             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11227             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11228             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11229             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11230             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11231             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11232             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11233             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11234             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11235             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11236             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11237             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11238             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11239         </fields>
11240
11241         <links>
11242             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11243             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11244             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11245             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11246             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11247         </links>
11248
11249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11250             <actions>
11251                 <create permission="URL_VERIFY">
11252                     <context link="session" field="owning_lib"/>
11253                 </create>
11254                 <retrieve permission="URL_VERIFY">
11255                     <context link="session" field="owning_lib"/>
11256                 </retrieve>
11257                 <update permission="URL_VERIFY">
11258                     <context link="session" field="owning_lib"/>
11259                 </update>
11260                 <delete permission="URL_VERIFY">
11261                     <context link="session" field="owning_lib"/>
11262                 </delete>
11263             </actions>
11264         </permacrud>
11265
11266     </class>
11267
11268     <class
11269         id="uvva"
11270         controller="open-ils.cstore open-ils.pcrud"
11271         oils_obj:fieldmapper="url_verify::verification_attempt"
11272         oils_persist:tablename="url_verify.verification_attempt"
11273         reporter:label="URL Verification Attempt"
11274     >
11275         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11276             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11277                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11278                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11279             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11280             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11281         </fields>
11282
11283         <links>
11284             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11285             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11286         </links>
11287
11288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11289             <actions>
11290                 <create permission="URL_VERIFY">
11291                     <context link="session" field="owning_lib"/>
11292                 </create>
11293                 <retrieve permission="URL_VERIFY">
11294                     <context link="session" field="owning_lib"/>
11295                 </retrieve>
11296                 <update permission="URL_VERIFY">
11297                     <context link="session" field="owning_lib"/>
11298                 </update>
11299                 <delete permission="URL_VERIFY">
11300                     <context link="session" field="owning_lib"/>
11301                 </delete>
11302             </actions>
11303         </permacrud>
11304
11305     </class>
11306
11307     <class
11308         id="uvuv"
11309         controller="open-ils.cstore open-ils.pcrud"
11310         oils_obj:fieldmapper="url_verify::url_verification"
11311         oils_persist:tablename="url_verify.url_verification"
11312         reporter:label="URL Verification"
11313     >
11314         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11315             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11316                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11317                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11318             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11319             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11320             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11321             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11322                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11323         </fields>
11324
11325         <links>
11326             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11327             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11328             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11329         </links>
11330
11331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11332             <actions>
11333                 <create permission="URL_VERIFY">
11334                     <context link="attempt" jump="session" field="owning_lib"/>
11335                 </create>
11336                 <retrieve permission="URL_VERIFY">
11337                     <context link="attempt" jump="session" field="owning_lib"/>
11338                 </retrieve>
11339                 <update permission="URL_VERIFY">
11340                     <context link="attempt" jump="session" field="owning_lib"/>
11341                 </update>
11342                 <delete permission="URL_VERIFY">
11343                     <context link="attempt" jump="session" field="owning_lib"/>
11344                 </delete>
11345             </actions>
11346         </permacrud>
11347
11348     </class>
11349
11350         <class
11351                 id="cfdi"
11352                 controller="open-ils.cstore open-ils.pcrud"
11353                 oils_obj:fieldmapper="config::filter_dialog_interface"
11354                 oils_persist:tablename="config.filter_dialog_interface"
11355                 reporter:label="FilterDialog Interface">
11356                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11357                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11358                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11359                 </fields>
11360                 <links>
11361                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11362                 </links>
11363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11364                         <actions>
11365                                 <retrieve />
11366                         </actions>
11367                 </permacrud>
11368         </class>
11369
11370         <class
11371                 id="cfdfs"
11372                 controller="open-ils.cstore open-ils.pcrud"
11373                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11374                 oils_persist:tablename="config.filter_dialog_filter_set"
11375                 reporter:label="FilterDialog Filter Set">
11376                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11377                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11378                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11379                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11380                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11381                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11382                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11383                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11384                 </fields>
11385                 <links>
11386                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11387                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11388                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11389                 </links>
11390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11391                         <actions>
11392                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11393                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11394                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11395                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11396                         </actions>
11397                 </permacrud>
11398
11399         </class>
11400
11401         <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">
11402                 <fields oils_persist:primary="code">
11403                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11404                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11405                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11406                 </fields>
11407                 <links/>
11408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11409                         <actions>
11410                                 <retrieve/>
11411                         </actions>
11412                 </permacrud>
11413         </class>
11414
11415         <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">
11416                 <oils_persist:source_definition>
11417
11418             SELECT  b.id,
11419                     MAX(dcp.edit_date) AS last_delete_date
11420              FROM   biblio.record_entry b
11421                     JOIN asset.call_number cn ON (cn.record = b.id)
11422                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11423              WHERE  NOT b.deleted
11424              GROUP BY b.id
11425              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11426
11427                 </oils_persist:source_definition>
11428                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11429                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11430                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11431                 </fields>
11432                 <links>
11433                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11434                 </links>
11435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11436                         <actions>
11437                                 <retrieve/>
11438                         </actions>
11439                 </permacrud>
11440         </class>
11441
11442         <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">
11443                 <oils_persist:source_definition>
11444
11445             -- -- 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.
11446             -- -- 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
11447             -- -- may not.
11448             -- SELECT
11449             --     bre.id AS bib_id,
11450             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11451             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11452             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11453             -- FROM (
11454                 SELECT
11455                     y.bre AS id,
11456                     COALESCE( x.copy_count, 0 ) AS copy_count,
11457                     y.hold_count AS hold_count,
11458                     (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
11459                 FROM (
11460                         SELECT
11461                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11462                             COUNT(*) AS hold_count
11463                         FROM action.hold_request h
11464                         WHERE
11465                             cancel_time IS NULL
11466                             AND fulfillment_time IS NULL
11467                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11468                         GROUP BY 1
11469                     )y LEFT JOIN (
11470                         SELECT 
11471                             (SELECT id
11472                                 FROM biblio.record_entry 
11473                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11474                             ) AS bre, 
11475                             COUNT(*) AS copy_count
11476                         FROM asset.copy
11477                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11478                         WHERE copy.holdable 
11479                             AND NOT copy.deleted 
11480                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11481                         GROUP BY 1
11482                     )x ON x.bre = y.bre
11483                 -- )z RIGHT JOIN (
11484                 --     SELECT id
11485                 --     FROM biblio.record_entry
11486                 --     WHERE NOT deleted
11487                 -- )bre ON (z.bib_id = bre.id)
11488                 
11489
11490                 </oils_persist:source_definition>
11491                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11492                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11493                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11494                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11495                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11496                 </fields>
11497                 <links>
11498                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11499                 </links>
11500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11501                         <actions>
11502                                 <retrieve/>
11503                         </actions>
11504                 </permacrud>
11505         </class>
11506
11507         <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">
11508                 <oils_persist:source_definition>
11509             SELECT *,
11510                 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,
11511                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11512             FROM
11513                 (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
11514                     FROM
11515                         action.hold_request ahr
11516                         JOIN reporter.hold_request_record rhrr USING (id)
11517                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11518                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11519                     WHERE
11520                         ahr.cancel_time IS NULL
11521                         AND ahr.fulfillment_time IS NULL
11522                     GROUP BY bib_record, pickup_lib
11523                 )x
11524                 JOIN
11525                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11526                     FROM
11527                         action.hold_request ahr
11528                         JOIN reporter.hold_request_record rhrr USING (id)
11529                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11530                     WHERE
11531                         ahr.cancel_time IS NULL
11532                         AND ahr.fulfillment_time IS NULL
11533                     GROUP BY bib_record
11534                 )y
11535                 USING (id)
11536                 </oils_persist:source_definition>
11537                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11538                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11539                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11540                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11541                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11542                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11543                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11544                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11545                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11546                 </fields>
11547                 <links>
11548                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11549                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11550                 </links>
11551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11552                         <actions>
11553                                 <retrieve/>
11554                         </actions>
11555                 </permacrud>
11556         </class>
11557
11558         <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) ">
11559                 <oils_persist:source_definition>
11560             WITH counts_at_ou AS (
11561                 SELECT  rhrr.bib_record AS id,
11562                         aou.id AS pickup_lib_or_desc,
11563                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11564                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11565                   FROM  actor.org_unit aou
11566                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11567                         action.hold_request ahr
11568                         JOIN reporter.hold_request_record rhrr USING (id)
11569                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11570                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11571                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11572                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11573                         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
11574                   GROUP BY 1, 2
11575             )
11576             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11577                    y.holds_everywhere, y.copy_count_everywhere,
11578                 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,
11579                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11580             FROM counts_at_ou x
11581                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11582                     FROM
11583                         action.hold_request ahr
11584                         JOIN reporter.hold_request_record rhrr USING (id)
11585                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11586                     WHERE
11587                         ahr.cancel_time IS NULL
11588                         AND ahr.fulfillment_time IS NULL
11589                     GROUP BY bib_record
11590                 )y
11591                 USING (id)
11592                 </oils_persist:source_definition>
11593                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11594                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11595                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11596                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11597                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11598                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11599                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11600                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11601                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11602                 </fields>
11603                 <links>
11604                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11605                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11606                 </links>
11607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11608                         <actions>
11609                                 <retrieve/>
11610                         </actions>
11611                 </permacrud>
11612         </class>
11613
11614         <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">
11615                 <oils_persist:source_definition>
11616             SELECT
11617                 ac.id,
11618                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11619                 MAX(actac.xact_start) AS last_circ
11620             FROM asset.copy ac
11621                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11622             GROUP BY ac.id
11623
11624             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11625             --SELECT
11626             --    ac.id,
11627             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11628             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11629             --FROM asset.copy ac
11630             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11631             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11632             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11633                 </oils_persist:source_definition>
11634                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11635                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11636                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11637                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11638                 </fields>
11639                 <links>
11640                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11641                 </links>
11642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11643                         <actions>
11644                                 <retrieve/>
11645                         </actions>
11646                 </permacrud>
11647         </class>
11648
11649         <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">
11650                 <fields oils_persist:primary="id">
11651                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11652                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11653                 </fields>
11654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11655                         <actions>
11656                                 <retrieve/>
11657                         </actions>
11658                 </permacrud>
11659         </class>
11660
11661         <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">
11662                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11663                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11664                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11665                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11666                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11667                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11668                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11669                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11670                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11671                 </fields>
11672                 <links>
11673                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11674                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11675                 </links>
11676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11677                         <actions>
11678                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11679                                 <retrieve/>
11680                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11681                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11682                         </actions>
11683                 </permacrud>
11684         </class>
11685
11686         <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">
11687                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11688                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11689                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11690                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11691                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11692                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11693                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11694                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11695                 </fields>
11696                 <links>
11697                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11698                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11699                 </links>
11700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11701                         <actions>
11702                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11703                                 <retrieve/>
11704                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11705                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11706                         </actions>
11707                 </permacrud>
11708         </class>
11709
11710
11711         <!-- ********************************************************************************************************************* -->
11712         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11713         <!-- ********************************************************************************************************************* -->
11714         <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">
11715                 <fields oils_persist:primary="id">
11716                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11717                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11718                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11719                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11720                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11721                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11722                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11723                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11724                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11725                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11726                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11727                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11728                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11729                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11730                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11731                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11732                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11733                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11734                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11735                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11736                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11737                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11738                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11739                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11740                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11741                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11742                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11743                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11744                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11745                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11746                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11747                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11748                 </fields>
11749                 <links>
11750                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11751                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11752                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11753                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11754                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11755                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11756                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11757                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11758                 </links>
11759         </class>
11760
11761         <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">
11762                 <fields oils_persist:primary="id">
11763                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11764                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11765                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11766                 </fields>
11767                 <links>
11768                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11769                 </links>
11770         </class>
11771
11772         <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">
11773                 <fields oils_persist:primary="id">
11774                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11775                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11776                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11777                 </fields>
11778                 <links>
11779                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11780                 </links>
11781         </class>
11782
11783         <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">
11784                 <fields oils_persist:primary="id">
11785                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11786
11787                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11788                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11789                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11790
11791                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11792                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11793                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11794
11795                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11796                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11797
11798                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11799                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11800                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11801
11802                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11803                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11804
11805                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11806                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11807                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11808
11809                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11810                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11811                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11812
11813                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11814                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11815                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11816                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11817
11818                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11819                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11820
11821                 </fields>
11822                 <links>
11823                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11824                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11825                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11826                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11827                 </links>
11828         </class>
11829
11830         <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">
11831                 <oils_persist:source_definition>
11832
11833             SELECT
11834                 po.ordering_agency AS ordering_agency,
11835                 po.id AS purchase_order,
11836                 li.id AS lineitem,
11837                 lid.id AS lineitem_detail,
11838                 cpa.id AS claim_policy_action
11839             FROM
11840                 acq.lineitem_detail lid
11841                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11842                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11843                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11844                 JOIN acq.claim_policy_action cpa ON (
11845                     cpa.claim_policy = cp.id
11846
11847                     -- we only care about claim policy actions whose claim
11848                     -- interval we'd reached or exceeded
11849                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11850
11851                     -- filter out all claim policy actions where claim events
11852                     -- have occurred on or after the action's action_interval
11853                     AND NOT EXISTS (
11854                         SELECT 1
11855                         FROM
11856                             acq.claim_event evt
11857                             JOIN acq.claim claim ON (
11858                                 claim.id = evt.claim
11859                                 AND claim.lineitem_detail = lid.id
11860                             )
11861                         WHERE
11862                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11863                     )
11864                 )
11865             WHERE
11866                 lid.cancel_reason IS NULL
11867                 AND li.cancel_reason IS NULL -- belt/suspenders
11868                 AND po.cancel_reason IS NULL -- belt/suspenders
11869                 AND lid.recv_time IS NULL
11870                 AND po.state = 'on-order'
11871             ORDER BY 1, 2, 3, 4, 5
11872
11873                 </oils_persist:source_definition>
11874                 <fields>
11875                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11876                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11877                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11878                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11879                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11880                 </fields>
11881                 <links>
11882                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11883                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11884                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11885                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11886                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11887                 </links>
11888         </class>
11889         <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">
11890                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11891                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11892                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11893                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11894                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11895                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11896                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11897                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11898                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11899                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11900                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11901                 </fields>
11902                 <links>
11903                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11904                 </links>
11905     </class>
11906         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11907                 <oils_persist:source_definition>
11908             SELECT * FROM acq.lineitem_summary 
11909                                 WHERE item_count > (invoice_count + cancel_count)
11910         </oils_persist:source_definition>
11911                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11912                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11913                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11914                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11915                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11916                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11917                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11918                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11919                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11920                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11921                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11922                 </fields>
11923                 <links>
11924                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11925                 </links>
11926     </class>
11927         <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">
11928                 <oils_persist:source_definition>
11929
11930                         SELECT  t.*
11931                           FROM  action.transit_copy t
11932                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11933                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11934                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11935
11936                 </oils_persist:source_definition>
11937                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11938                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11939                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11940                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11941                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11942                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11943                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11944                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11945                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11946                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11947                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11948                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11949                 </fields>
11950                 <links>
11951                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11952                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11953                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11954                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11955                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11956                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11957                 </links>
11958         </class>
11959
11960     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11961                 <oils_persist:source_definition>
11962
11963         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11964                 SELECT
11965                         cp.id as copy,
11966                         COUNT(circ.id),
11967                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11968                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11969                 FROM
11970                         asset.copy cp
11971                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11972                 GROUP BY 1, 3, 4
11973                 UNION ALL
11974                 SELECT
11975                         cp.id as copy,
11976                         COUNT(circ.id),
11977                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11978                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11979                 FROM
11980                         asset.copy cp
11981                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11982                 GROUP BY 1, 3, 4
11983                 UNION ALL
11984                 SELECT
11985                         id as copy,
11986                         circ_count,
11987                         -1 AS year,
11988                         false as is_renewal
11989                 FROM
11990                         extend_reporter.legacy_circ_count
11991         )x GROUP BY 1, 3, 4
11992
11993                 </oils_persist:source_definition>
11994         <fields>
11995             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11996             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11997             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11998             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11999         </fields>
12000                 <links>
12001                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12002                 </links>
12003                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12004                         <actions>
12005                                 <retrieve/>
12006                         </actions>
12007                 </permacrud>
12008     </class>
12009
12010         <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">
12011                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12012                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12013                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12014                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12015                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12016                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12017                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12018                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12019                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12020                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12021                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12022                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12023                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12024                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12025                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12026                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12027                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12028                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12029                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12030                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12031                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12032                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12033                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12034                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12035                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12036                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12037                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12038                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12039                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12040                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12041                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12042                 </fields>
12043                 <links>
12044                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12045                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12046                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12047                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12048                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12049                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12050                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12051                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12052                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12053                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12054                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12055                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12056                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12057                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12058                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12059                 </links>
12060         </class>
12061
12062     <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">
12063         <fields oils_persist:primary="id">
12064             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12065             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12066             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12067             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12068             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12069             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12070             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12071             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12072             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12073             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12074             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12075             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12076             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12077             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12078             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12079             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12080             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12081             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12082             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12083             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12084             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12085             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12086             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12087             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12088             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12089             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12090             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12091             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12092             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12093             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12094             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12095             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12096             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12097             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12098         </fields>
12099         <links>
12100             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12101             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12102             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12103             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12104             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12105             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12106             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12107             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12108         </links>
12109     </class>
12110
12111     <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">
12112         <fields oils_persist:primary="id">
12113             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12114             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12115             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12116             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12117         </fields>
12118         <links>
12119             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12120             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12121         </links>
12122     </class>
12123
12124     <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">
12125         <fields oils_persist:primary="owning_lib">
12126             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12127             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12128             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12129         </fields>
12130         <links>
12131             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12132         </links>
12133     </class>
12134
12135     <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">
12136         <fields oils_persist:primary="id">
12137             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12138             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12139             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12140             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12141             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12142         </fields>
12143         <links>
12144             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12145             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12146             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12147         </links>
12148     </class>
12149
12150     <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">
12151         <fields oils_persist:primary="circ_lib">
12152             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12153             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12154             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12155             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12156         </fields>
12157         <links>
12158             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12159             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12160         </links>
12161     </class>
12162
12163     <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">
12164         <fields oils_persist:primary="id">
12165             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12166             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12167             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12168             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12169             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12170         </fields>
12171         <links>
12172             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12173             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12174             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12175         </links>
12176     </class>
12177
12178     <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">
12179         <fields oils_persist:primary="home_ou">
12180             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12181             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12182             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12183             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12184         </fields>
12185         <links>
12186             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12187             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12188         </links>
12189     </class>
12190         <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">
12191                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12192                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12193                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12194                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12195                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12196                 </fields>
12197                 <links>
12198                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12199                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12200                 </links>
12201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12202                         <actions>
12203                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12204                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12205                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12206                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12207                         </actions>
12208                 </permacrud>
12209         </class>
12210         <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">
12211                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12212                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12213                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12214                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12215                 </fields>
12216                 <links>
12217                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12218                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12219                         </links>
12220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12221                 <actions>
12222                                 <create permission="ADMIN_ACQ_FUND_TAG">
12223                                         <context link="tag" field="owner"/>
12224                                 </create>
12225                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12226                                         <context link="tag" field="owner"/>
12227                                 </retrieve>
12228                                 <update permission="ADMIN_ACQ_FUND_TAG">
12229                                         <context link="tag" field="owner"/>
12230                                 </update>
12231                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12232                                         <context link="tag" field="owner"/>
12233                                 </delete>
12234                         </actions>
12235                 </permacrud>
12236         </class>
12237         <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">
12238                 <oils_persist:source_definition><![CDATA[
12239                 SELECT
12240                         poi.purchase_order AS purchase_order,
12241                         ii.invoice AS invoice,
12242                         NULL AS lineitem,
12243                         poi.id AS po_item,
12244                         NULL AS picklist
12245                 FROM
12246                         acq.po_item poi
12247                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12248                 UNION SELECT
12249                         jub.purchase_order AS purchase_order,
12250                         ie.invoice AS invoice,
12251                         jub.id AS lineitem,
12252                         NULL AS po_item,
12253                         jub.picklist AS picklist
12254                 FROM
12255                         acq.lineitem jub
12256                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12257                 UNION SELECT
12258                         ii.purchase_order AS purchase_order,
12259                         ii.invoice AS invoice,
12260                         NULL AS lineitem,
12261                         NULL AS po_item,
12262                         NULL AS picklist
12263                 FROM
12264                         acq.invoice_item ii
12265                 WHERE ii.po_item IS NULL
12266                 UNION SELECT
12267                         ie.purchase_order AS purchase_order,
12268                         ie.invoice AS invoice,
12269                         NULL AS lineitem,
12270                         NULL AS po_item,
12271                         NULL AS picklist
12272                 FROM
12273                         acq.invoice_entry ie
12274                 WHERE ie.lineitem IS NULL
12275                 UNION SELECT
12276                         NULL AS purchase_order,
12277                         NULL AS invoice,
12278                         jub.id AS lineitem,
12279                         NULL AS po_item,
12280                         jub.picklist AS picklist
12281                 FROM
12282                         acq.lineitem jub
12283                 WHERE jub.purchase_order IS NULL
12284                 ]]></oils_persist:source_definition>
12285                 <fields>
12286                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12287                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12288                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12289                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12290                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12291                 </fields>
12292                 <links>
12293                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12294                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12295                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12296                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12297                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12298                 </links>
12299         </class>
12300         <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">
12301                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12302                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12303                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12304                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12305                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12306                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12307                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12308                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12309                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12310                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12311                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12312                 </fields>
12313                 <links>
12314                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12315                 </links>
12316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12317                         <actions>
12318                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12319                                 <retrieve/>
12320                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12321                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12322                         </actions>
12323                 </permacrud>
12324         </class>
12325
12326         <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">
12327                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12328                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12329                         <field name="date_applied" reporter:datatype="timestamp"/>
12330                         <field name="org" reporter:datatype="org_unit"/>
12331                         <field name="original_value" reporter:datatype="text"/>
12332                         <field name="new_value" reporter:datatype="text"/>
12333                         <field name="field_name" reporter:datatype="link"/>
12334                 </fields>
12335                 <links>
12336                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12337                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12338                 </links>
12339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12340                         <actions>
12341                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12342                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12343                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12344                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12345                         </actions>
12346                 </permacrud>
12347         </class>
12348         <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">
12349                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12350                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12351                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12352                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12353                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12354                 </fields>
12355                 <links>
12356                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12357                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12358                 </links>
12359         </class>
12360         <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">
12361                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12362                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12363                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12364                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12365                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12366                 </fields>
12367                 <links>
12368                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12369                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12370                 </links>
12371         </class>
12372         <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">
12373                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12374                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12375                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12376                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12377                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12378                 </fields>
12379                 <links>
12380                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12381                 </links>
12382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12383                         <actions>
12384                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12385                                 <retrieve/>
12386                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12387                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12388                         </actions>
12389                 </permacrud>
12390         </class>
12391         <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">
12392                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12393                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12394                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12395                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12396                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12397                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12398                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12399                 </fields>
12400                 <links>
12401                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12402                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12403                 </links>
12404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12405                         <actions>
12406                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12407                                 <retrieve/>
12408                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12409                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12410                         </actions>
12411                 </permacrud>
12412         </class>
12413         <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">
12414                 <fields oils_persist:primary="code">
12415                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12416                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12417                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12418                 </fields>
12419                 <links>
12420                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12421                 </links>
12422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12423                         <actions>
12424                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12425                                 <retrieve/>
12426                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12427                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12428                         </actions>
12429                 </permacrud>
12430         </class>
12431         <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">
12432                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12433                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12434                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12435                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12436                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12437                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12438                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12439                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12440                 </fields>
12441                 <links>
12442                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12443                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12444                 </links>
12445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12446                         <actions>
12447                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12448                                 <retrieve/>
12449                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12450                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12451                         </actions>
12452                 </permacrud>
12453         </class>
12454         <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">
12455                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12456                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12457                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12458                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12459                 </fields>
12460                 <links>
12461                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12462                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12463                 </links>
12464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12465                         <actions>
12466                                 <create permission="UPDATE_COPY">
12467                     <context link="copy" field="circ_lib"/>
12468                 </create>
12469                                 <retrieve/>
12470                                 <update permission="UPDATE_COPY">
12471                     <context link="copy" field="circ_lib"/>
12472                 </update>
12473                                 <delete permission="UPDATE_COPY">
12474                     <context link="copy" field="circ_lib"/>
12475                 </delete>
12476                         </actions>
12477                 </permacrud>
12478         </class>
12479         <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">
12480         <oils_persist:source_definition>
12481         SELECT ahcm.target_copy AS id,count(*) AS count
12482          FROM
12483          action.hold_request ahr,
12484          action.hold_copy_map ahcm
12485          WHERE
12486          ahr.cancel_time IS NULL AND
12487          ahr.fulfillment_time IS NULL AND
12488          ahr.capture_time IS NULL AND
12489          ahr.id = ahcm.hold
12490          GROUP BY ahcm.target_copy
12491         </oils_persist:source_definition>
12492         <fields oils_persist:primary="id">
12493             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12494             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12495         </fields>
12496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12497             <actions>
12498                <retrieve/>
12499             </actions>
12500         </permacrud>
12501         </class>
12502
12503         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12504                 oils_obj:fieldmapper="config::workstation_setting_type" 
12505                 oils_persist:tablename="config.workstation_setting_type" 
12506                 reporter:label="Workstation Setting Type">
12507                 <fields oils_persist:primary="name">
12508                         <field name="name" reporter:datatype="text"/>
12509                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12510                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12511                         <field name="datatype" reporter:datatype="text"/>
12512                         <field name="fm_class" reporter:datatype="text"/>
12513                         <field name="grp" reporter:datatype="link"/>
12514                 </fields>
12515                 <links>
12516                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12517                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12518                 </links>
12519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12520                         <actions>
12521                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12522                                 <retrieve/>
12523                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12524                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12525                         </actions>
12526                 </permacrud>
12527         </class>
12528
12529         <!-- no pcrud access is granted for now, because it's assumed these
12530                          setting values will be applied and retrived via the API. -->
12531         <class id="awss" 
12532                 controller="open-ils.cstore"
12533                 oils_obj:fieldmapper="actor::workstation_setting" 
12534                 oils_persist:tablename="actor.workstation_setting" 
12535                 reporter:label="Workstation Setting">
12536                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12537                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12538                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12539                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12540                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12541                 </fields>
12542                 <links>
12543                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12544                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12545                 </links>
12546         </class>
12547
12548         <!-- ********************************************************************************************************************* -->
12549 </IDL>
12550
12551 <!--
12552     vim:noet:ts=4:sw=4:
12553 -->