]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1676608: copy alert and suppression matrix
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
809                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
811                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
812                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
813                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
814                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
815                 </fields>
816                 <links>
817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
819                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
821                 </links>
822         </class>
823
824     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
825         <fields oils_persist:primary="name">
826             <field reporter:label="Name" name="name" reporter:datatype="text"/>
827             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
828             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
829             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
830         </fields>
831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
832             <actions>
833                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
834                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837             </actions>
838         </permacrud>
839     </class>
840
841     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
842         <fields oils_persist:primary="id">
843             <field reporter:label="ID" name="id" reporter:datatype="id"/>
844             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
847             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
848         </fields>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
854                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
860                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
862                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
863                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
864                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
865                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
866                 </fields>
867                 <links>
868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
869                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
870                 </links>
871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872             <actions>
873                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
874                 <retrieve/>
875                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
876                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877             </actions>
878         </permacrud>
879         </class>
880
881         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
882                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
883                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
884                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
885                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
886         </fields>
887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888             <actions>
889                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
890                 <retrieve/>
891                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
892                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
893             </actions>
894         </permacrud>
895         </class>
896
897         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
899                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
900                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
901                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
902                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
903                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
906                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
907                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
908                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
909                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
910         </fields>
911                 <links>
912                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
914         </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
918                 <retrieve/>
919                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
920                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
928                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
929                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
934                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
935                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
936                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
937         </fields>
938                 <links>
939                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
941         </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
945                 <retrieve/>
946                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
947                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
948             </actions>
949         </permacrud>
950         </class>
951
952         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
953                 <fields oils_persist:primary="name">
954                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
955                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
957                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
958                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
959                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
960                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
961                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
962                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
963                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
964                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
965                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
966                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
967                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
968                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
969                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
970                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
971                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
972                 </fields>
973                 <links>
974                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
975                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <create permission="ADMIN_SVF" global_required="true"/>
980                 <retrieve/>
981                 <update permission="ADMIN_SVF" global_required="true"/>
982                 <delete permission="ADMIN_SVF" global_required="true"/>
983             </actions>
984         </permacrud>
985         </class>
986
987         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
988                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
990                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
992             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
993                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1001                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1007                 <fields oils_persist:primary="coded_value">
1008                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1009                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1010                 </fields>
1011                 <links>
1012                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1013                 </links>
1014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1015             <actions>
1016                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1017                 <retrieve/>
1018                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1019                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1020             </actions>
1021         </permacrud>
1022         </class>
1023
1024         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1025                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1026                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1027                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1028                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1029                 </fields>
1030                 <links>
1031                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1032                 </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <retrieve/>
1036             </actions>
1037         </permacrud>
1038         </class>
1039
1040
1041         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1043                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1044                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1045                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1046                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1047                 </fields>
1048                 <links>
1049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1050                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1051                 </links>
1052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053             <actions>
1054                 <retrieve/>
1055             </actions>
1056         </permacrud>
1057         </class>
1058
1059
1060         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1061                 <fields oils_persist:primary="source">
1062                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1063                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1064                 </fields>
1065                 <links>
1066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1067                 </links>
1068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069             <actions>
1070                 <retrieve/>
1071             </actions>
1072         </permacrud>
1073         </class>
1074
1075         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1076                 <fields>
1077                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1078                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1079                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1080                 </fields>
1081                 <links>
1082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1083                 </links>
1084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085             <actions>
1086                 <retrieve/>
1087             </actions>
1088         </permacrud>
1089         </class>
1090
1091         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1092                 <fields oils_persist:primary="id">
1093                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1094                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1107                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1109                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1110                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1111                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1112                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1113                 </fields>
1114                 <links>
1115                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1116                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1117                 </links>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1123                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1130                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1131                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1132                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1133                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1134                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1136                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1137             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1138             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1139             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1140                 </fields>
1141                 <links>
1142                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1143                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1148                 <retrieve/>
1149                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1150                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1157                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1158                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1159                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1160                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1161                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1162                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1163                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1164                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1165                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1166                 </fields>
1167                 <links>
1168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1169                 </links>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1173                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1181         <fields oils_persist:primary="name">
1182             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1183             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1185             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1186             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1187             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1188             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1189             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1190             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1191             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1192         </fields>
1193         <links>
1194             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1195             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1202                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205     </class>
1206
1207     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1208         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1209             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1210             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1211             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1212             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1213             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1214             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1215             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1216         </fields>
1217         <links>
1218             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1219         </links>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1225                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228     </class>
1229
1230     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1231                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1232                         oils_persist:tablename="config.z3950_index_field_map" 
1233                         reporter:label="Z39.50 Index Field Map">
1234         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1235             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1236             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1237             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1238             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1239             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1241         </fields>
1242         <links>
1243             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1244             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1245             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1246         </links>
1247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248             <actions>
1249                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <retrieve/>
1251                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1252                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253             </actions>
1254         </permacrud>
1255     </class>
1256
1257
1258         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1260                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1263                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1264                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1265                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                 </fields>
1267                 <links>
1268             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1269             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <retrieve/>
1274                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1275                         </actions>
1276                 </permacrud>
1277         </class>
1278
1279         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1280                 <fields oils_persist:primary="key">
1281                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1282                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1284                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1285                 </fields>
1286                 <links/>
1287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1288                         <actions>
1289                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1290                                 <retrieve/>
1291                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1292                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1298                 <fields oils_persist:primary="module">
1299                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1301                 </fields>
1302                 <links/>
1303         </class>
1304
1305         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1306                 <fields oils_persist:primary="module">
1307                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1309                 </fields>
1310                 <links/>
1311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1312                         <actions>
1313                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1314                                 <retrieve/>
1315                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1316                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1317                         </actions>
1318                 </permacrud>
1319         </class>
1320
1321         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1322                 <fields oils_persist:primary="module">
1323                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1325                 </fields>
1326                 <links/>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1330                                 <retrieve/>
1331                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1332                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1338                 <fields oils_persist:primary="module">
1339                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1341                 </fields>
1342                 <links/>
1343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1344                         <actions>
1345                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1346                                 <retrieve/>
1347                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1348                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1349                         </actions>
1350                 </permacrud>
1351         </class>
1352
1353         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1354                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1355                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1356                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1357                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1358                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1359                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1360                 </fields>
1361                 <links>
1362                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1363                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1364                 </links>
1365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1366                         <actions>
1367                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1368                     <context link="event_def" field="owner"/>
1369                 </create>
1370                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1371                     <context link="event_def" field="owner"/>
1372                 </retrieve>
1373                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1374                     <context link="event_def" field="owner"/>
1375                 </update>
1376                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1377                     <context link="event_def" field="owner"/>
1378                 </delete>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1385                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1387                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1388                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1389                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1390                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1391                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1392                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1393                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1394                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1396                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1398                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1399                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1400                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1402                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1403                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1404                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1405                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1406                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1407                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1408                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1410                 </fields>
1411                 <links>
1412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1413                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1414                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1415                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1416                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1418                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1419                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1420                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1421                 </links>
1422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423                         <actions>
1424                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1428                         </actions>
1429                 </permacrud>
1430         </class>
1431
1432         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1434                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1435                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1436                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1437                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1443                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1444                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1445                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1446                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1447                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1448                 </fields>
1449                 <links>
1450                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1451                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1454                 </links>
1455         </class>
1456
1457         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1459                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1460                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1461                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1462                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1463                 </fields>
1464                 <links>
1465                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1470                     <context link="event_def" field="owner"/>
1471                 </create>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1473                     <context link="event_def" field="owner"/>
1474                 </retrieve>
1475                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1476                     <context link="event_def" field="owner"/>
1477                 </update>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1479                     <context link="event_def" field="owner"/>
1480                 </delete>
1481                         </actions>
1482                 </permacrud>
1483         </class>
1484
1485         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1486                 <oils_persist:source_definition><![CDATA[
1487                 SELECT  atevdef.hook,
1488                         atevdef.name,
1489                         atevdef.reactor,
1490                         atev.id,
1491                         atev.event_def,
1492                         atev.add_time,
1493                         atev.run_time,
1494                         atev.start_time,
1495                         atev.update_time,
1496                         atev.complete_time,
1497                         atev.update_process,
1498                         atev.state,
1499                         atev.user_data,
1500                         atev.template_output,
1501                         atev.error_output,
1502                         atev.async_output,
1503                         targ_circ.id AS target_circ,
1504                         targ_ahr.id AS target_hold,
1505                         COALESCE(
1506                                 targ_circ.circ_lib,
1507                                 targ_ahr.pickup_lib
1508                         ) AS perm_lib
1509                 FROM action_trigger.event atev
1510                 JOIN action_trigger.event_definition atevdef ON
1511                         (atevdef.id = atev.event_def)
1512                 JOIN action_trigger.hook ath ON
1513                         (ath.key = atevdef.hook)
1514                 LEFT JOIN action.circulation targ_circ ON
1515                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1516                 LEFT JOIN action.hold_request targ_ahr ON
1517                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1518                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1874                 </fields>
1875                 <links>
1876                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1881                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1883                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1884                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1885                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1886                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1887                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1888                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1889             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1890                 </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899         </class>
1900
1901         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1903                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1904                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1905                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1906                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1907                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1909                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1910                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1911                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1917                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1918             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1919                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1920                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1921             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1922                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1923                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1925                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1926             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1927             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1928             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1929                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1930                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1931                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1932                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1933                 </fields>
1934                 <links>
1935                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1938                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1939                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1941                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1942                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1943                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1944                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1945                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1946                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1947                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1948                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1949             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1950                 </links>
1951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952             <actions>
1953                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1956                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1957             </actions>
1958         </permacrud>
1959         </class>
1960
1961     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1962         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1963             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1964             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1965             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1966         </fields>
1967         <links/>
1968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1969             <actions>
1970                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <retrieve/>
1972                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1973                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1974             </actions>
1975         </permacrud>
1976     </class>
1977
1978     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1979         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1980             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1981             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1982             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1983             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1984             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1985             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1986             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1987         </fields>
1988         <links>
1989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1990         </links>
1991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1992             <actions>
1993                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <retrieve/>
1995                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1996                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1997             </actions>
1998         </permacrud>
1999     </class>
2000
2001     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2002         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2003             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2004             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2005             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2006             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2007             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2008         </fields>
2009         <links>
2010             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2011             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2012         </links>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2016                     <context link="matchpoint" field="org_unit"/>
2017                 </create>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2020                     <context link="matchpoint" field="org_unit"/>
2021                 </update>
2022                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2023                     <context link="matchpoint" field="org_unit"/>
2024                 </delete>
2025             </actions>
2026         </permacrud>
2027     </class>
2028
2029     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2030         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2031             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2032             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2033             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2034         </fields>
2035         <links>
2036             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2037             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2038         </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2042                     <context link="limit_set" field="owning_lib"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2046                     <context link="limit_set" field="owning_lib"/>
2047                 </update>
2048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2049                     <context link="limit_set" field="owning_lib"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053     </class>
2054     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2055         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2056             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2057             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2058             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2059         </fields>
2060         <links>
2061             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2062             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2063         </links>
2064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2065             <actions>
2066                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="limit_set" field="owning_lib"/>
2068                 </create>
2069                 <retrieve/>
2070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2071                     <context link="limit_set" field="owning_lib"/>
2072                 </update>
2073                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2074                     <context link="limit_set" field="owning_lib"/>
2075                 </delete>
2076             </actions>
2077         </permacrud>
2078     </class>
2079
2080     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2081         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2082             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2083             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2084             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2085             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2086         </fields>
2087         <links>
2088             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2089             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2090         </links>
2091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092             <actions>
2093                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2094                     <context link="limit_set" field="owning_lib"/>
2095                 </create>
2096                 <retrieve/>
2097                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2098                     <context link="limit_set" field="owning_lib"/>
2099                 </update>
2100                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2101                     <context link="limit_set" field="owning_lib"/>
2102                 </delete>
2103             </actions>
2104         </permacrud>
2105     </class>
2106
2107         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2109                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2111                 </fields>
2112                 <links/>
2113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2114             <actions>
2115                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <retrieve/>
2117                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2118                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2119             </actions>
2120         </permacrud>
2121         </class>
2122
2123         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2125                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2128                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2129                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2130                 </fields>
2131                 <links>
2132                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2133                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2134                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="ADMIN_SURVEY">
2139                     <context link="survey" field="owner"/>
2140                 </create>
2141                 <retrieve/>
2142                 <update permission="ADMIN_SURVEY">
2143                     <context link="survey" field="owner"/>
2144                 </update>
2145                 <delete permission="ADMIN_SURVEY">
2146                     <context link="survey" field="owner"/>
2147                 </delete>
2148             </actions>
2149         </permacrud>
2150         </class>
2151         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="">
2153                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2154                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2155                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2156                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2157                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2158                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2159                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2160                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2161                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2162                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2163                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2164                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2165                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2166                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2167                 </fields>
2168                 <links>
2169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2170                 </links>
2171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2172                         <actions>
2173                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2174                                         <context link="usr" field="home_ou" />
2175                                 </retrieve>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2180                 <fields oils_persist:primary="id" oils_persist:sequence="">
2181                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2182                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2183                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2184                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2185                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2186                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2187                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2189                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2190                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2191                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2192                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2193                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2194                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2195                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2196                 </fields>
2197                 <links>
2198                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2199                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2200                 </links>
2201         </class>
2202         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2204                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2207                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2208                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2209                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2210                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2211                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2215                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2216                 </links>
2217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218                         <actions> <!-- created magically, so no create action -->
2219                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2220                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2221                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2222                         </actions>
2223                 </permacrud>
2224         </class>
2225         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2227                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2228                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2230                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2232                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2233                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2234                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2235                 </fields>
2236                 <links>
2237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2238                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2239                 </links>
2240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2241                         <actions> <!-- created magically, so no create action -->
2242                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2243                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2244                         </actions>
2245                 </permacrud>
2246         </class>
2247         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2249                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2251                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2253                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2260                 </links>
2261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262             <actions>
2263                 <create permission="UPDATE_USER" context_field="owner">
2264                     <context link="usr" field="home_ou"/>
2265                 </create>
2266                                 <!-- note: public notes are still accessible via API -->
2267                 <retrieve permission="UPDATE_USER">
2268                     <context link="usr" field="home_ou"/>
2269                                 </retrieve>
2270                 <update permission="UPDATE_USER">
2271                     <context link="usr" field="home_ou"/>
2272                                 </update>
2273                 <delete permission="UPDATE_USER">
2274                     <context link="usr" field="home_ou"/>
2275                                 </delete>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2281                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2282                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2283                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2284                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2286                 </fields>
2287                 <links>
2288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2289                 </links>
2290         </class>
2291         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2293                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2294                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2295                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2296                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2297                 </fields>
2298                 <links>
2299                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2300                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2301                 </links>
2302         </class>
2303         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2305                         <field name="field" reporter:datatype="link"/>
2306                         <field name="id" reporter:datatype="id" />
2307                         <field name="source" reporter:datatype="link"/>
2308                         <field name="value" reporter:datatype="text"/>
2309                 </fields>
2310                 <links>
2311                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2312                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2313                 </links>
2314         </class>
2315         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2316                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2317                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2318                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2319                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2320                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2321                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2322                 </fields>
2323                 <links>
2324                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2325                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2327                 </links>
2328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2329                         <actions>
2330                                 <retrieve/>
2331                         </actions>
2332                 </permacrud>
2333         </class>
2334         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2335                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2336                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2338                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2339                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2340                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2341                 </fields>
2342                 <links>
2343                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2344                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2345                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2346                 </links>
2347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348                         <actions>
2349                                 <retrieve/>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2355                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2356                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2357                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2358                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2360                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2361                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2362                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2363                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2365                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2370                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2372                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2373                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2375                 </links>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="TRANSIT_COPY" context_field="owner">
2379                     <context link="target_copy" field="circ_lib"/>
2380                 </create>
2381                 <retrieve/>
2382                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2383                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2384             </actions>
2385         </permacrud>
2386         </class>
2387         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2389                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2390                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2391                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2393                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2394                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2395                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2396                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2397                 </fields>
2398                 <links>
2399                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2400                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2401                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2403                 </links>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="ADMIN_SURVEY">
2407                     <context link="survey" field="owner"/>
2408                 </create>
2409                 <retrieve permission="VIEW_USER">
2410                     <context link="usr" field="home_ou"/>
2411                 </retrieve>
2412                 <update permission="ADMIN_SURVEY">
2413                     <context link="survey" field="owner"/>
2414                 </update>
2415                 <delete permission="ADMIN_SURVEY">
2416                     <context link="survey" field="owner"/>
2417                 </delete>
2418             </actions>
2419         </permacrud>
2420         </class>
2421         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2423                         <field name="bucket" />
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="target_copy" reporter:datatype="link"/>
2426                         <field name="create_time" reporter:datatype="timestamp" />
2427                         <field name="pos" reporter:datatype="int" />
2428                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2429                 </fields>
2430                 <links>
2431                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2432                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2433             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2434                 </links>
2435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2436                         <actions>
2437                                 <retrieve permission="ADMIN_COPY_BUCKET">
2438                     <context link="bucket" owning_lib="owning_lib"/>
2439                 </retrieve>
2440             </actions>
2441         </permacrud>
2442         </class>
2443         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2444                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2445                         <field name="id" reporter:datatype="id" />
2446                         <field name="item" reporter:datatype="link"/>
2447                         <field name="note" reporter:datatype="text" />
2448                 </fields>
2449                 <links>
2450                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2451                 </links>
2452         </class>
2453
2454         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2455                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2456                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2457                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2458                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2459                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2460                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2461                 </fields>
2462                 <links>
2463                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2464                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2465                 </links>
2466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2467                         <actions>
2468                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2469                                 <retrieve/>
2470                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2471                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2472                         </actions>
2473                 </permacrud>
2474         </class>
2475
2476         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2478                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2479                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2480                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2481                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2482                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2483                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2484                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2485                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2486                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2487                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2488                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2489                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2490                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2491                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2492                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2493                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2494                 </fields>
2495                 <links>
2496                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2497                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2498                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2499                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2500                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2501                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2502                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2503                 </links>
2504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2505                         <actions>
2506                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2507                                 <retrieve/>
2508                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2509                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2510                         </actions>
2511                 </permacrud>
2512         </class>
2513
2514         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2516                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2517                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2518                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2519                 </fields>
2520                 <links>
2521                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2522                 </links>
2523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2524                         <actions>
2525                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2526                                 <retrieve/>
2527                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2528                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2529                         </actions>
2530                 </permacrud>
2531         </class>
2532
2533         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2535                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2536                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2537                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2541                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2542                 </links>
2543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544                         <actions>
2545                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2546                                 <retrieve/>
2547                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2548                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2549                         </actions>
2550                 </permacrud>
2551         </class>
2552
2553         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2554                 <fields oils_persist:primary="code">
2555                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2556                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2557                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2558                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2559                         <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">
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"/>
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="Class" name="field_class" reporter:datatype="link"/>
2831                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2832                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2833                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2834                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2835                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2836                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2837                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2838                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2839                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2840                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2841                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2842                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2843                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2844                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2845                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2846                 </fields>
2847                 <links>
2848                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2849                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2850                 </links>
2851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2852             <actions>
2853                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2854                 <retrieve/>
2855                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2856                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2857             </actions>
2858         </permacrud>
2859         </class>
2860         <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">
2861                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2862                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2863                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2864                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2865                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2866                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2867                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2868                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2869                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2870                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2871                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2872                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2873                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2874                 </fields>
2875                 <links>
2876                 </links>
2877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2878                         <actions>
2879                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2880                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2881                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2882                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2883                         </actions>
2884                 </permacrud>
2885         </class>
2886         <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">
2887                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2888                         <field name="id" reporter:datatype="id" />
2889                         <field name="name" reporter:datatype="text"/>
2890                         <field name="xpath" reporter:datatype="text"/>
2891                         <field name="format" reporter:datatype="link"/>
2892                         <field name="first_word" reporter:datatype="bool" />
2893                 </fields>
2894                 <links/>
2895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2896             <actions>
2897                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2898                 <retrieve/>
2899                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2900                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2901             </actions>
2902         </permacrud>
2903         </class>
2904         <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">
2905                 <fields oils_persist:primary="code" oils_persist:sequence="">
2906                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2907                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2908                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2909                 </fields>
2910                 <links/>
2911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2912             <actions>
2913                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2914                 <retrieve/>
2915                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2916                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2917             </actions>
2918         </permacrud>
2919         </class>
2920         <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">
2921                 <fields oils_persist:primary="code" oils_persist:sequence="">
2922                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2923                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2924                 </fields>
2925                 <links/>
2926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2927             <actions>
2928                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2929                 <retrieve/>
2930                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2931                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2932             </actions>
2933         </permacrud>
2934         </class>
2935     <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">
2936         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2937             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2938             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2939             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2940             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2941         </fields>
2942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2943             <actions>
2944                 <retrieve/>
2945             </actions>
2946         </permacrud>
2947     </class>
2948         <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">
2949                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2950                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2951                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2952                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2953                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2954                 </fields>
2955                 <links>
2956                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2957                 </links>
2958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2959             <actions>
2960                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2961                 <retrieve/>
2962                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2963                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2964             </actions>
2965         </permacrud>
2966         </class>
2967         <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">
2968                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2969                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2970                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2971                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2972                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2973                 </fields>
2974                 <links>
2975                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2976                 </links>
2977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2978             <actions>
2979                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2980                 <retrieve/>
2981                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2982                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2983             </actions>
2984         </permacrud>
2985         </class>
2986         <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">
2987                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2988                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2989                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2990                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2991                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2992                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2993                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2994                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2995                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2996                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2997                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2998                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2999                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3000                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3001                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3002                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3003                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3004                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3005                 </fields>
3006                 <links>
3007                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3008                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3009                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3010                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3011                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3012                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3013                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3014                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3015                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3016                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3017                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3018                 </links>
3019         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3020             <actions>
3021                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3022                 <retrieve/>
3023                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3024                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3025             </actions>
3026         </permacrud>
3027         </class>
3028         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3029                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3030                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3031                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3032                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3033                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3034                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3035                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3036                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3037                 </fields>
3038                 <links>
3039                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3040                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3041         </links>
3042         </class>
3043         <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">
3044                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3045                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3046                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3047                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3048                 </fields>
3049                 <links>
3050                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3051                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3052                 </links>
3053         </class>
3054         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3055                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3056                         <field name="id" reporter:datatype="id" />
3057                         <field name="value" oils_persist:i18n="true" />
3058                 </fields>
3059                 <links/>
3060         </class>
3061         <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">
3062                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3063                         <field name="balance_owed" reporter:datatype="money" />
3064                         <field name="total_owed" reporter:datatype="money" />
3065                         <field name="total_paid" reporter:datatype="money" />
3066                         <field name="usr" reporter:datatype="link"/>
3067                 </fields>
3068                 <links>
3069                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3070         </links>
3071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3072             <actions>
3073                 <retrieve permission="VIEW_USER">
3074                     <context link="usr" field="home_ou"/>
3075                 </retrieve>
3076             </actions>
3077         </permacrud>
3078         </class>
3079         <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">
3080                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3081                         <field name="collector" />
3082                         <field name="enter_time" reporter:datatype="timestamp"/>
3083                         <field name="id" reporter:datatype="id" />
3084                         <field name="location" reporter:datatype="link"/>
3085                         <field name="usr" reporter:datatype="link"/>
3086                 </fields>
3087                 <links>
3088                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3089                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3090                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3091                 </links>
3092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3093             <actions>
3094                 <create permission="money.collections_tracker.create" context_field="location"/>
3095                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3096                 <delete permission="money.collections_tracker.create" context_field="location"/>
3097             </actions>
3098         </permacrud>
3099         </class>
3100         <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">
3101                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3102                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3103                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3104                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3105                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3106                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3107                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3108                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3109                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3110                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3111                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3112                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3113                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3114                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3115                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3116                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3117                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3118                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3119                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3120                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3121                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3122                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3123                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3124                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3125                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3126                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3127                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3128                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3129                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3130                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3131                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3132                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3133                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3134                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3135                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3136                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3137                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3138                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3139                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3140                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3141                 </fields>
3142                 <links>
3143                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3144                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3145                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3146                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3147                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3148                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3149                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3150                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3151                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3152                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3153                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3154                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3155                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3156                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3157                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3158                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3159                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3160                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3161                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3162                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3163                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3164                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3165                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3166                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3167                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3168                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3169                 </links>
3170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3171             <actions>
3172                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3173                 <retrieve/>
3174                 <update permission="UPDATE_MARC" global_required="true"/>
3175                 <!-- 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. -->
3176                 <delete permission="DELETE_RECORD" global_required="true"/>
3177             </actions>
3178         </permacrud>
3179         </class>
3180         <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">
3181                 <fields oils_persist:primary="id">
3182                         <field name="dow_0_close" />
3183                         <field name="dow_0_open" />
3184                         <field name="dow_1_close" />
3185                         <field name="dow_1_open" />
3186                         <field name="dow_2_close" />
3187                         <field name="dow_2_open" />
3188                         <field name="dow_3_close" />
3189                         <field name="dow_3_open" />
3190                         <field name="dow_4_close" />
3191                         <field name="dow_4_open" />
3192                         <field name="dow_5_close" />
3193                         <field name="dow_5_open" />
3194                         <field name="dow_6_close" />
3195                         <field name="dow_6_open" />
3196                         <field name="id" reporter:datatype="id" />
3197                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3198                 </fields>
3199                 <links>
3200                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3201                 </links>
3202         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3203             <actions>
3204                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3205                 <retrieve/>
3206                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3207                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3208             </actions>
3209         </permacrud>
3210         </class>
3211         <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">
3212                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3213                         <field name="id" reporter:datatype="id" />
3214                         <field name="record" reporter:datatype="link"/>
3215                         <field name="label" reporter:datatype="text"/>
3216                         <field name="label_sortkey" reporter:datatype="text"/>
3217                         <field name="deleted" reporter:datatype="bool"/>
3218                 </fields>
3219                 <links>
3220                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3221                 </links>
3222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3223             <actions>
3224                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3225                 <retrieve/>
3226                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3227                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3228             </actions>
3229         </permacrud>
3230         </class>
3231         <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">
3232                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3233                         <field name="id" reporter:datatype="id" />
3234                         <field name="target_copy" reporter:datatype="link" />
3235                         <field name="part" reporter:datatype="link"/>
3236                 </fields>
3237                 <links>
3238                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3239                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3240                 </links>
3241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3242             <actions>
3243                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3244                 <retrieve/>
3245                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3246                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3247             </actions>
3248         </permacrud>
3249         </class>
3250         <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">
3251                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3252                         <field name="close_end" reporter:datatype="timestamp" />
3253                         <field name="close_start" reporter:datatype="timestamp" />
3254                         <field name="id" reporter:datatype="id" />
3255                         <field name="org_unit" reporter:datatype="org_unit"/>
3256                         <field name="reason" reporter:datatype="text"/>
3257                         <field name="full_day" reporter:datatype="bool"/>
3258                         <field name="multi_day" reporter:datatype="bool"/>
3259                 </fields>
3260                 <links>
3261                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3262                 </links>
3263         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3264             <actions>
3265                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3266                 <retrieve/>
3267                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3268                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3269             </actions>
3270         </permacrud>
3271         </class>
3272         <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">
3273                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3274                         <field name="extended" reporter:datatype="interval"/>
3275                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3276                         <field name="max_renewals" reporter:datatype="int" />
3277                         <field name="name" reporter:datatype="text"/>
3278                         <field name="normal" reporter:datatype="interval"/>
3279                         <field name="shrt" reporter:datatype="interval"/>
3280                 </fields>
3281                 <links>
3282                 </links>
3283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3284             <actions>
3285                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3286                 <retrieve/>
3287                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3288                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3289             </actions>
3290         </permacrud>
3291         </class>
3292
3293         <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">
3294                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3295                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3296                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3297             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3298                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3299             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3300                 </fields>
3301                 <links>
3302             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3303                 </links>
3304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3305             <actions>
3306                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3307                 <retrieve/>
3308                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3309                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3310             </actions>
3311                 </permacrud>
3312         </class>
3313
3314         <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">
3315                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3316                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3317                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3318                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3319             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3320                 </fields>
3321                 <links>
3322                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3323                 </links>
3324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3325             <actions>
3326                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3327                 <retrieve/>
3328                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3329                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3330             </actions>
3331                 </permacrud>
3332         </class>
3333
3334         <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">
3335                 <fields oils_persist:primary="id" oils_persist:sequence="">
3336                         <field name="balance_owed" reporter:datatype="money"/>
3337                         <field name="id" reporter:datatype="id" />
3338                         <field name="last_billing_note" reporter:datatype="text"/>
3339                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3340                         <field name="last_billing_type" reporter:datatype="text"/>
3341                         <field name="last_payment_note" reporter:datatype="text"/>
3342                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3343                         <field name="last_payment_type" reporter:datatype="text"/>
3344                         <field name="total_owed" reporter:datatype="money"/>
3345                         <field name="total_paid" reporter:datatype="money"/>
3346                         <field name="usr" reporter:datatype="link"/>
3347                         <field name="xact_finish" reporter:datatype="timestamp" />
3348                         <field name="xact_start" reporter:datatype="timestamp" />
3349                         <field name="xact_type" reporter:datatype="text"/>
3350                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3351                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3352                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3353                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3354                         <field name="billing_location" reporter:datatype="link"/>
3355                 </fields>
3356                 <links>
3357                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3358                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3359                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3360                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3361                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3362                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3363                 </links>
3364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3365                         <actions>
3366                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3367                                         <context link="usr" field="home_ou" />
3368                                 </retrieve>
3369                         </actions>
3370                 </permacrud>
3371         </class>
3372         <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">
3373                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3374                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3375                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3376                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3377                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3378                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3379                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3380                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3381                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3382                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3383                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3384                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3385                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3386                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3387                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3388                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3389                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3390                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3391                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3392                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3393                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3394                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3395                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3396                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3397                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3398                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3399                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3400                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3401                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3402                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3403                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3404                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3405                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3406                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3407                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3408                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3409                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3410                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3411                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3412                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3413                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3414                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3415                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3416                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3417                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3418                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3419                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3420                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3421                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3422                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3423                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3424                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3425                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3426                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3427                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3428                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3429                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3430                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3431                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3432                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3433                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3434                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3435                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3436                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3437                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3438                 </fields>
3439                 <links>
3440                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3441                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3442                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3443                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3444                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3445                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3446                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3447                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3448                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3449                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3450                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3451                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3452                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3453                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3454                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3455                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3456                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3457                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3458                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3459                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3460                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3461                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3462                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3463                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3464                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3465                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3466                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3467                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3468                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3469                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3470                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3471                 </links>
3472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3473                         <actions>
3474                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3475                         </actions>
3476                 </permacrud>
3477         </class>
3478         <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">
3479                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3480                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3481                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3482                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3483                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3484                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3485                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3486                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3487                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3488         </fields>
3489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3490                         <actions>
3491                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3492                                 <retrieve/>
3493                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3494                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3495                         </actions>
3496                 </permacrud>
3497         </class>
3498         <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">
3499                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3500                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3501                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3502                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3503                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3504         </fields>
3505         <links>
3506                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3507                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3508                 </links>
3509                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3510                         <actions>
3511                                 <retrieve permission="RUN_REPORTS">
3512                                         <context link="usr" field="home_ou" />
3513                                 </retrieve>
3514                         </actions>
3515                 </permacrud>
3516         </class>
3517         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3518                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3519                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3520                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3521                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3522                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3523                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3524                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3525         </fields>
3526         <links>
3527                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3528                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3529                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3530                 </links>
3531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3532                         <actions>
3533                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3534                                         <context link="usr" field="home_ou" />
3535                                         <context link="ws" field="owning_lib" />
3536                                 </retrieve>
3537                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3538                                         <context link="usr" field="home_ou" />
3539                                         <context link="ws" field="owning_lib" />
3540                                 </create>
3541                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3542                                         <context link="usr" field="home_ou" />
3543                                         <context link="ws" field="owning_lib" />
3544                                 </update>
3545                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3546                                         <context link="usr" field="home_ou" />
3547                                         <context link="ws" field="owning_lib" />
3548                                 </delete>
3549                         </actions>
3550                 </permacrud>
3551         </class>
3552         <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">
3553                 <fields oils_persist:primary="name">
3554                         <field name="name" reporter:datatype="text"/>
3555                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3556                 </fields>
3557                 <links/>
3558                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3559                         <actions>
3560                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3561                                 <retrieve/>
3562                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3563                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3564                         </actions>
3565                 </permacrud>
3566         </class>
3567         <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">
3568                 <fields oils_persist:primary="name">
3569                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3570                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3571                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3572                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3573                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3574                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3575                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3576                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3577                 </fields>
3578                 <links>
3579                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3580                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3581                 </links>
3582                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3583                         <actions>
3584                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3585                                 <retrieve/>
3586                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3587                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3588                         </actions>
3589                 </permacrud>
3590         </class>
3591         <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">
3592                 <fields oils_persist:primary="name">
3593                         <field name="name" reporter:datatype="text"/>
3594                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3595                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3596                         <field name="datatype" reporter:datatype="text"/>
3597                         <field name="view_perm" reporter:datatype="link"/>
3598                         <field name="update_perm" reporter:datatype="link"/>
3599                         <field name="fm_class" reporter:datatype="text"/>
3600                         <field name="grp" reporter:datatype="link"/>
3601                 </fields>
3602                 <links>
3603                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3604                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3605                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3606                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3607                 </links>
3608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3609                         <actions>
3610                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3611                                 <retrieve/>
3612                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3613                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3614                         </actions>
3615                 </permacrud>
3616         </class>
3617         <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">
3618                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3619                         <field name="id" />
3620                         <field name="name"  reporter:datatype="text"/>
3621                         <field name="org_unit" reporter:datatype="org_unit"/>
3622                         <field name="value"  reporter:datatype="text"/>
3623                 </fields>
3624                 <links>
3625                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3626                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3627                 </links>
3628         </class>
3629         <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">
3630                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3631                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3632                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3633                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3634                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3635                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3636                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3637                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3638                 </fields>
3639                 <links>
3640                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3641                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3642                 </links>
3643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3644             <actions>
3645                 <create permission="CREATE_COPY_NOTE">
3646                     <context link="owning_copy" field="circ_lib"/>
3647                 </create>
3648                 <retrieve permission="VIEW_COPY_NOTES">
3649                     <context link="owning_copy" field="circ_lib"/>
3650                 </retrieve>
3651                 <update permission="UPDATE_COPY_NOTE">
3652                     <context link="owning_copy" field="circ_lib"/>
3653                 </update>
3654                 <delete permission="DELETE_COPY_NOTE">
3655                     <context link="owning_copy" field="circ_lib"/>
3656                 </delete>
3657             </actions>
3658         </permacrud>
3659         </class>
3660         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3661                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3662                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3663                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3664                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3665                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3666                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3667                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3668                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3669                 </fields>
3670                 <links>
3671                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3672                 </links>
3673         </class>
3674         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3676                         <field name="fingerprint"  reporter:datatype="text"/>
3677                         <field name="id" reporter:datatype="id" />
3678                         <field name="master_record" reporter:datatype="link"/>
3679                         <field name="mods"  reporter:datatype="text"/>
3680                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3681                 </fields>
3682                 <links>
3683                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3684                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3685                 </links>
3686         </class>
3687         <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">
3688                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3689                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3690                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3691                 </fields>
3692                 <links/>
3693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3694             <actions>
3695                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3696                 <retrieve/>
3697                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3698                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3699             </actions>
3700         </permacrud>
3701         </class>
3702         <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">
3703                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3704                         <field name="code"  reporter:datatype="text"/>
3705                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3706                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3707                 </fields>
3708                 <links/>
3709         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3710             <actions>
3711                 <create permission="CREATE_PERM" global_required="true"/>
3712                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3713                 <update permission="UPDATE_PERM" global_required="true"/>
3714                 <delete permission="DELETE_PERM" global_required="true"/>
3715             </actions>
3716         </permacrud>
3717         </class>
3718         <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">
3719                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3720                         <field name="id" reporter:datatype="id" />
3721                         <field name="metarecord" reporter:datatype="link"/>
3722                         <field name="source" reporter:datatype="link"/>
3723                 </fields>
3724                 <links>
3725                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3726                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3727                 </links>
3728         </class>
3729         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
3730                         oils_obj:fieldmapper="metabib::display_entry" 
3731                         oils_persist:tablename="metabib.display_entry" 
3732                         oils_persist:field_safe="true"
3733                         reporter:label="Display Field Entry" oils_persist:readonly="true">
3734                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
3735                         <field name="id" reporter:datatype="id" />
3736                         <field name="field" reporter:datatype="link"/>
3737                         <field name="source" reporter:datatype="link"/>
3738                         <field name="value"  reporter:datatype="text"/>
3739                 </fields>
3740                 <links>
3741                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3742                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3743                 </links>
3744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3745                         <actions>
3746                                 <retrieve/>
3747                         </actions>
3748                 </permacrud>
3749         </class>
3750         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
3751                 oils_persist:tablename="metabib.flat_display_entry"
3752                 oils_obj:fieldmapper="metabib::flat_display_entry" 
3753                 oils_persist:field_safe="true"
3754                 reporter:label="Flat Display Entry" 
3755                 oils_persist:readonly="true">
3756                 <fields>
3757                         <field name="source" reporter:datatype="id" />
3758                         <field name="name" reporter:datatype="text"/>
3759                         <field name="multi" reporter:datatype="bool"/>
3760                         <field name="label" reporter:datatype="text"/>
3761                         <field name="field" reporter:datatype="link"/>
3762                         <field name="value" reporter:datatype="text"/>
3763                 </fields>
3764                 <links>
3765                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3766                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3767                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3768                 </links>
3769                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3770                         <actions>
3771                                 <retrieve/>
3772                         </actions>
3773                 </permacrud>
3774         </class>
3775         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
3776                 oils_persist:tablename="metabib.compressed_display_entry"
3777                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
3778                 oils_persist:field_safe="true"
3779                 reporter:label="Compressed Display Entry" 
3780                 oils_persist:readonly="true">
3781                 <fields>
3782                         <field name="source" reporter:datatype="id" />
3783                         <field name="name" reporter:datatype="text"/>
3784                         <field name="multi" reporter:datatype="bool"/>
3785                         <field name="label" reporter:datatype="text"/>
3786                         <field name="field" reporter:datatype="link"/>
3787                         <field name="value" reporter:datatype="text"/>
3788                 </fields>
3789                 <links>
3790                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3791                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3792                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3793                 </links>
3794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3795                         <actions>
3796                                 <retrieve/>
3797                         </actions>
3798                 </permacrud>
3799         </class>
3800         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
3801                 oils_persist:tablename="metabib.wide_display_entry"
3802                 oils_obj:fieldmapper="metabib::wide_display_entry" 
3803                 oils_persist:field_safe="true"
3804                 reporter:label="Wide Display Entry" 
3805                 oils_persist:readonly="true">
3806                 <fields oils_persist:primary="source">
3807                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
3808                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
3809                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
3810                         <field name="subject" reporter:label="Subject" reporter:datatype="text"/>
3811                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
3812                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
3813                         <!-- TODO add all well-known fields -->
3814                 </fields>
3815                 <links>
3816                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3817                 </links>
3818                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3819                         <actions>
3820                                 <retrieve/>
3821                         </actions>
3822                 </permacrud>
3823         </class>
3824
3825         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
3826                 oils_persist:tablename="config.display_field_map"
3827                 oils_obj:fieldmapper="config::display_field_map"
3828                 oils_persist:field_safe="true"
3829                 reporter:label="Display Field Map" 
3830                 oils_persist:readonly="true">
3831                 <fields oils_persist:primary="name">
3832                         <field name="name" reporter:datatype="text"/>
3833                         <field name="field" reporter:datatype="link"/>
3834                         <field name="multi" reporter:datatype="bool"/>
3835                 </fields>
3836                 <links>
3837                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3838                 </links>
3839                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3840                         <actions>
3841                                 <retrieve/>
3842                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3843                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3844                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3845                         </actions>
3846                 </permacrud>
3847         </class>
3848
3849         <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">
3850                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3851                         <field name="id" reporter:datatype="id" />
3852                         <field name="field" reporter:datatype="link"/>
3853                         <field name="source" reporter:datatype="link"/>
3854                         <field name="value"  reporter:datatype="text"/>
3855                 </fields>
3856                 <links>
3857                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3858                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3859                 </links>
3860         </class>
3861         <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">
3862                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3863                         <field name="id" reporter:datatype="id" />
3864                         <field name="value" reporter:datatype="text"/>
3865                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3866                 </fields>
3867                 <links>
3868                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3869                 </links>
3870         </class>
3871         <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">
3872                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3873                         <field name="id" reporter:datatype="id" />
3874                         <field name="entry" reporter:datatype="link"/>
3875                         <field name="def" reporter:datatype="link"/>
3876                         <field name="source" reporter:datatype="link"/>
3877                 </fields>
3878                 <links>
3879                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3880                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3881                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3882                 </links>
3883         </class>
3884         <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">
3885                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3886                         <field name="id" reporter:datatype="id" />
3887                         <field name="entry" reporter:datatype="link"/>
3888                         <field name="simple_heading" reporter:datatype="link"/>
3889                 </fields>
3890                 <links>
3891                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3892                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3893                 </links>
3894         </class>
3895         <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">
3896                 <oils_persist:source_definition>
3897                         SELECT * FROM metabib.author_field_entry
3898                                                 UNION ALL
3899                         SELECT * FROM metabib.keyword_field_entry
3900                                                 UNION ALL
3901                         SELECT * FROM metabib.identifier_field_entry
3902                                                 UNION ALL
3903                         SELECT * FROM metabib.title_field_entry
3904                                                 UNION ALL
3905                         SELECT * FROM metabib.subject_field_entry
3906                                                 UNION ALL
3907                         SELECT * FROM metabib.series_field_entry
3908                 </oils_persist:source_definition>
3909                 <fields>
3910                         <field name="field" reporter:datatype="link"/>
3911                         <field name="id" reporter:datatype="id" />
3912                         <field name="source" reporter:datatype="link"/>
3913                         <field name="value"  reporter:datatype="text"/>
3914                 </fields>
3915                 <links>
3916                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3917                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3918                 </links>
3919         </class>
3920         <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">
3921                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3922                         <field name="field" reporter:datatype="link"/>
3923                         <field name="id" reporter:datatype="id" />
3924                         <field name="source" reporter:datatype="link"/>
3925                         <field name="value"  reporter:datatype="text"/>
3926                 </fields>
3927                 <links>
3928                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3929                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3930                 </links>
3931         </class>
3932         <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">
3933                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3934                         <field name="accepting_usr" reporter:datatype="link"/>
3935                         <field name="amount" reporter:datatype="money" />
3936                         <field name="amount_collected" reporter:datatype="money" />
3937                         <field name="cash_drawer" reporter:datatype="link"/>
3938                         <field name="id" reporter:datatype="id" />
3939                         <field name="note"  reporter:datatype="text"/>
3940                         <field name="payment_ts" reporter:datatype="timestamp"/>
3941                         <field name="xact" reporter:datatype="link"/>
3942                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3943                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3944                 </fields>
3945                 <links>
3946                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3947                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3948                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3949                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3950                 </links>
3951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3952             <actions>
3953                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3954                     <context link="xact" jump="usr" field="home_ou"/>
3955                 </retrieve>
3956                         </actions>
3957                 </permacrud>
3958         </class>
3959         <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">
3960                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3961                         <field name="accepting_usr" reporter:datatype="link"/>
3962                         <field name="amount" reporter:datatype="money" />
3963                         <field name="amount_collected" reporter:datatype="money" />
3964                         <field name="id" reporter:datatype="id" />
3965                         <field name="note"  reporter:datatype="text"/>
3966                         <field name="payment_ts" reporter:datatype="timestamp"/>
3967                         <field name="xact" reporter:datatype="link"/>
3968                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3969                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3970                 </fields>
3971                 <links>
3972                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3973                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3974                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3975                 </links>
3976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3977             <actions>
3978                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3979                     <context link="xact" jump="usr" field="home_ou"/>
3980                 </retrieve>
3981                         </actions>
3982                 </permacrud>
3983         </class>
3984         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3985                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3986                         <field name="accepting_usr" reporter:datatype="link"/>
3987                         <field name="amount" reporter:datatype="money" />
3988                         <field name="amount_collected" reporter:datatype="money" />
3989                         <field name="id" reporter:datatype="id" />
3990                         <field name="note"  reporter:datatype="text"/>
3991                         <field name="payment_ts" reporter:datatype="timestamp"/>
3992                         <field name="xact" reporter:datatype="link"/>
3993                         <field name="billing" reporter:datatype="link"/>
3994                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3995                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3996                 </fields>
3997                 <links>
3998                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3999                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4000                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4001                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4002                 </links>
4003         </class>
4004         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4005                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4006                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4007                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4008                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4009                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4010                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4011                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4012                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4013                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4014                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4015                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4016                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4017                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4018                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4019                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4020                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4021                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4022                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4023                 </fields>
4024                 <links>
4025                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4026                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4027                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4028                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4029                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4030                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4031                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4032                 </links>
4033         </class>
4034
4035         <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">
4036                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4037                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4038                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4039                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4040                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4041                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4042                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4043                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4044                 </fields>
4045                 <links/>
4046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4047             <actions>
4048                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4049                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4050                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4051                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4052             </actions>
4053         </permacrud>
4054         </class>
4055         <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">
4056                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4057                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4058                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4059                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4060                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4061                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4062                 </fields>
4063                 <links>
4064                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4065                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4066                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4067         </links>
4068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4069             <actions>
4070                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4071                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4072                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4073                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4074             </actions>
4075         </permacrud>
4076         </class>
4077         <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">
4078                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4079                         <field name="holdable" reporter:datatype="bool"/>
4080                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4081                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4082                         <field name="opac_visible" reporter:datatype="bool"/>
4083             <field name="copy_active" reporter:datatype="bool"/>
4084             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4085             <field name="is_available" reporter:datatype="bool"/>
4086                 </fields>
4087                 <links/>
4088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4089             <actions>
4090                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4091                 <retrieve/>
4092                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4093                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4094             </actions>
4095         </permacrud>
4096         </class>
4097         <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">
4098                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4099                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4100                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4101                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4102                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4103                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4104                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4105                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4106                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4107                 </fields>
4108                 <links>
4109                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4110                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4111                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4112                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4113                 </links>
4114                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4115                         <actions>
4116                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4117                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4118                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4119                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4120                         </actions>
4121                 </permacrud>
4122         </class>
4123         <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">
4124                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4125                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4126                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4127                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4128                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4129                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4130                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4131                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4132                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4133                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4134                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4135                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4136                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4137                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4138                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4139                 </fields>
4140                 <links>
4141                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4142                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4143                 </links>
4144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4145                         <actions>
4146                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4147                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4148                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4149                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4150                         </actions>
4151                 </permacrud>
4152         </class>
4153         <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">
4154                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4155                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4156                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4157                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4158                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4159                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4160                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4161                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4162                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4163                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4164                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4165                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4166                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4167                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4168                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4169                 </fields>
4170                 <links>
4171                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4172                 </links>
4173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4174                         <actions>
4175                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4176                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4177                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4178                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4179                         </actions>
4180                 </permacrud>
4181         </class>
4182
4183
4184         <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">
4185                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4186                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4187                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4188                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4189                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4190                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4191                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4192                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4193                 </fields>
4194                 <links>
4195                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4196                 </links>
4197         </class>
4198
4199         <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">
4200                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4201                         <field name="call_number" />
4202                         <field name="create_date" reporter:datatype="timestamp"/>
4203                         <field name="creator" reporter:datatype="link"/>
4204                         <field name="id" reporter:datatype="id" />
4205                         <field name="pub" reporter:datatype="bool"/>
4206                         <field name="title"  reporter:datatype="text"/>
4207                         <field name="value"  reporter:datatype="text"/>
4208                 </fields>
4209                 <links>
4210                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4211                 </links>
4212         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4213             <actions>
4214                 <create permission="CREATE_VOLUME_NOTE">
4215                     <context link="call_number" field="owning_lib"/>
4216                 </create>
4217                 <retrieve permission="VIEW_VOLUME_NOTES">
4218                     <context link="call_number" field="owning_lib"/>
4219                 </retrieve>
4220                 <update permission="UPDATE_VOLUME_NOTE">
4221                     <context link="call_number" field="owning_lib"/>
4222                 </update>
4223                 <delete permission="DELETE_VOLUME_NOTE">
4224                     <context link="call_number" field="owning_lib"/>
4225                 </delete>
4226             </actions>
4227         </permacrud>
4228         </class>
4229         <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">
4230                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4231                         <field name="create_date" reporter:datatype="timestamp"/>
4232                         <field name="creator" reporter:datatype="link"/>
4233                         <field name="edit_date" reporter:datatype="timestamp"/>
4234                         <field name="editor" reporter:datatype="link"/>
4235                         <field name="id" reporter:datatype="id" />
4236                         <field name="record" reporter:datatype="link"/>
4237                         <field name="value" reporter:datatype="text"/>
4238                 </fields>
4239                 <links>
4240                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4241                 </links>
4242         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4243             <actions>
4244                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4245                 <retrieve/>
4246                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4247                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4248             </actions>
4249         </permacrud>
4250         </class>
4251         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4252         <oils_persist:source_definition>
4253 SELECT  usr,
4254         SUM(
4255             CASE
4256                 WHEN (
4257                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4258                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4259                 ) THEN 1
4260                 ELSE 0
4261             END
4262         ) AS out,
4263
4264         SUM(
4265             CASE
4266                 WHEN (
4267                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4268                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4269                 ) THEN 1
4270                 ELSE 0
4271             END
4272         ) AS overdue,
4273
4274         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4275         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4276         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4277   FROM  action.circulation
4278   WHERE checkin_time IS NULL
4279   GROUP BY 1
4280         </oils_persist:source_definition>
4281         <fields oils_persist:primary="usr">
4282             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4283             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4284             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4285             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4286             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4287             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4288         </fields>
4289         <links>
4290             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4291         </links>
4292         </class>
4293         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4294         <oils_persist:source_definition>
4295 SELECT  usr,
4296         STRING_AGG(
4297             CASE
4298                 WHEN (
4299                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4300                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4301                 ) THEN id::TEXT
4302                 ELSE '0'
4303             END
4304         ,',') AS out,
4305
4306         STRING_AGG(
4307             CASE
4308                 WHEN (
4309                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4310                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4311                 ) THEN id::TEXT
4312                 ELSE '0'
4313             END
4314         ,',') AS overdue,
4315
4316         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4317         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4318         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4319   FROM  action.circulation
4320   WHERE checkin_time IS NULL
4321   GROUP BY 1
4322         </oils_persist:source_definition>
4323         <fields oils_persist:primary="usr">
4324             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4325             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4326             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4327             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4328             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4329             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4330         </fields>
4331         <links>
4332             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4333         </links>
4334         </class>
4335         <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">
4336                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4337                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4338                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4339                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4340                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4341                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4342                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4343                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4344                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4345                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4346                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4347                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4348                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4349                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4350                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4351                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4352                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4353                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4354                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4355                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4356                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4357                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4358                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4359                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4360                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4361                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4362                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4363                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4364                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4365                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4366                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4367                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4368                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4369                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4370                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4371                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4372                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4373                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4374                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4375                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4376                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4377                 </fields>
4378                 <links>
4379                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4380                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4381                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4382                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4383                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4384                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4385                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4386                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4387                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4388                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4389                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4390                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4391                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4392                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4393                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4394                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4395                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4396                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4397                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4398                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4399                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4400                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4401                 </links>
4402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4403                         <actions>
4404                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4405                         </actions>
4406                 </permacrud>
4407         </class>
4408         <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">
4409                 <fields>
4410                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4411                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4412                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4413                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4414                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4415                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4416                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4417                 </fields>
4418                 <links>
4419                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4420                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4421                 </links>
4422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4423                         <actions>
4424                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4425                         </actions>
4426                 </permacrud>
4427         </class>
4428         <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">
4429                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4430                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4431                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4432                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4433                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4434                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4435                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4436                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4437                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4438                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4439                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4440                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4441                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4442                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4443                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4444                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4445                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4446                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4447                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4448                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4449                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4450                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4451                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4452                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4453                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4454                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4455                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4456                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4457                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4458                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4459                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4460                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4461                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4462                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4463                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4464                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4465                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4466                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4467                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4468                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4469                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4470                 </fields>
4471                 <links>
4472                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4473                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4474                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4475                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4476                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4477                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4478                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4479                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4480                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4481                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4482                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4483                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4484                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4485                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4486                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4487                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4488                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4489                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4490                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4491                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4492                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4493                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4494                 </links>
4495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4496                         <actions>
4497                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4498                         </actions>
4499                 </permacrud>
4500         </class>
4501
4502         <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">
4503                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4504                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4505                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4506                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4507                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4508                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4509                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4510                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4511                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4512                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4513                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4514                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4515                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4516                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4517                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4518                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4519                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4520                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4521                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4522                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4523                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4524                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4525                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4526                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4527                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4528                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4529                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4530                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4531                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4532                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4533                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4534                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4535                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4536                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4537                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4538                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4539                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4540                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4541                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4542                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4543                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4544                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4545                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4546                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4547                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4548                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4549                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4550                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4551                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4552                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4553                 </fields>
4554                 <links>
4555                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4556                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4557                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4558                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4559                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4560                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4561                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4562                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4563                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4564                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4565                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4566                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4567                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4568                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4569                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4570                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4571                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4572                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4573                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4574                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4575                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4576                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4577                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4578                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4579                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4580                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4581                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4582                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4583                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4584                 </links>
4585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4586                         <actions>
4587                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4588                         </actions>
4589                 </permacrud>
4590         </class>
4591         <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">
4592                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4593                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4594                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4595                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4596                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4597                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4598                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4599                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4600                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4601                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4602                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4603                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4604                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4605                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4606                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4607                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4608                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4609                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4610                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4611                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4612                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4613                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4614                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4615                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4616                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4617                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4618                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4619                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4620                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4621                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4622                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4623                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4624                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4625                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4626                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4627                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4628                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4629                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4630                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4631                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4632                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4633                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4634                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4635                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4636                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4637                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4638                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4639                 </fields>
4640                 <links>
4641                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4642                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4643                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4644                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4645                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4646                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4647                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4648                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4649                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4650                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4651                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4652                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4653                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4654                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4655                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4656                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4657                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4658                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4659                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4660                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4661                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4662                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4663                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4664                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4665                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4666                 </links>
4667         </class>
4668         <class id="auch" 
4669                 controller="open-ils.cstore" 
4670                 oils_obj:fieldmapper="action::user_circ_history" 
4671                 oils_persist:tablename="action.usr_circ_history" 
4672                 reporter:label="User Checkout History">
4673                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4674                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4675                         <!-- prevent reporting on the user that owns the checkout history -->
4676                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4677                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4678                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4679                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4680                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4681                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4682                 </fields>
4683                 <links>
4684                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4685                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4686                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4687                 </links>
4688         </class>
4689         <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">
4690                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4691                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4692                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4693                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4694                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4695                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4696                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4697                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4698                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4699                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4700                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4701                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4702                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4703                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4704                 </fields>
4705                 <links>
4706                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4707                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4708                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4709                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4710                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4711                 </links>
4712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4713                         <actions>
4714                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4715                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4716                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4717                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4718                         </actions>
4719                 </permacrud>
4720         </class>
4721
4722         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4723                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4724                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4725                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4726                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4727                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4728                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4729                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4730                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4731                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4732                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4733                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4734                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4735                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4736                 </fields>
4737                 <links>
4738                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4739                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4740                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4741                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4742                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4743                 </links>
4744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4745                         <actions>
4746                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4747                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4748                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4749                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4750                         </actions>
4751                 </permacrud>
4752         </class>
4753         
4754         <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">
4755                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4756                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4757                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4758                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4759                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4760                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4761                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4762                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4763                 </fields>
4764                 <links>
4765                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4766                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4767                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4768                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4769                 </links>
4770                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4771                         <actions>
4772                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4773                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4774                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4775                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4776                         </actions>
4777                 </permacrud>
4778         </class>
4779         
4780         <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">
4781                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4782                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4783                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4784                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4785                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4786                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4787                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4788                 </fields>
4789                 <links>
4790                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4791                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4792                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4793                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4794                 </links>
4795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4796                         <actions>
4797                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4798                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4799                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4800                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4801                         </actions>
4802                 </permacrud>
4803         </class>
4804         
4805         <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">
4806                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4807                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4808                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4809                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4810                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4811                 </fields>
4812                 <links>
4813                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4814                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4815                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4816                 </links>
4817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4818                         <actions>
4819                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4820                     <context link="resource" field="owner" />
4821                 </create>
4822                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4823                     <context link="resource" field="owner" />
4824                 </retrieve>
4825                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4826                     <context link="resource" field="owner" />
4827                 </update>
4828                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4829                     <context link="resource" field="owner" />
4830                 </delete>
4831                         </actions>
4832                 </permacrud>
4833         </class>
4834         
4835         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4836                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4837                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4838                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4839                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4840                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4841                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4842                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4843                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4844                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4845                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4846                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4847                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4848                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4849                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4850                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4851                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4852                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4853                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4854                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4855                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4856                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4857                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4858                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4859                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4860                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4861                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4862                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4863                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4864                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4865                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4866                 </fields>
4867                 <links>
4868                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4869                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4870                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4871                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4872                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4873                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4874                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4875                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4876                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4877                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4878                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4879                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4880                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4881                 </links>
4882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4883                         <actions>
4884                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4885                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4886                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4887                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4888                         </actions>
4889                 </permacrud>
4890         </class>
4891         
4892         <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">
4893                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4894                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4895                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4896                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4897                 </fields>
4898                 <links>
4899                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4900                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4901                 </links>
4902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4903                         <actions>
4904                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4905                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4906                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4907                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4908                         </actions>
4909                 </permacrud>
4910         </class>
4911
4912         <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">
4913                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4914                         <field name="bucket" reporter:datatype="link"/>
4915                         <field name="id" reporter:datatype="id" />
4916                         <field name="target_call_number" reporter:datatype="link" />
4917                         <field name="create_time" reporter:datatype="timestamp" />
4918                         <field name="pos" reporter:datatype="int" />
4919                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4920                 </fields>
4921                 <links>
4922                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4923                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4924             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4925                 </links>
4926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4927                         <actions>
4928                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
4929                     <context link="bucket" owning_lib="owning_lib"/>
4930                 </retrieve>
4931             </actions>
4932         </permacrud>
4933         </class>
4934         <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">
4935                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4936                         <field name="id" reporter:datatype="id" />
4937                         <field name="item" reporter:datatype="link"/>
4938                         <field name="note" reporter:datatype="text" />
4939                 </fields>
4940                 <links>
4941                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4942                 </links>
4943         </class>
4944         <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">
4945                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4946                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4947                         <field name="btype" reporter:datatype="text"/>
4948                         <field name="id" reporter:datatype="id" />
4949                         <field name="name" reporter:datatype="text"/>
4950                         <field name="description" reporter:datatype="text"/>
4951                         <field name="owner" reporter:datatype="link"/>
4952                         <field name="pub" reporter:datatype="bool"/>
4953                         <field name="create_time" reporter:datatype="timestamp" />
4954                         <field name="owning_lib" reporter:datatype="org_unit" />
4955                 </fields>
4956                 <links>
4957                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4958                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4959                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4960                 </links>
4961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4962                         <actions>
4963                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4964                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4965                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4966                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4967                         </actions>
4968                 </permacrud>
4969         </class>
4970         <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">
4971                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4972                         <field name="id" reporter:datatype="id" />
4973                         <field name="bucket" reporter:datatype="link"/>
4974                         <field name="note" reporter:datatype="text" />
4975                 </fields>
4976                 <links>
4977                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4978                 </links>
4979         </class>
4980         <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">
4981                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4982                         <field name="hold" reporter:datatype="link"/>
4983                         <field name="id" reporter:datatype="id" />
4984                         <field name="target_copy" reporter:datatype="link"/>
4985                         <field name="proximity" reporter:datatype="number"/>
4986                 </fields>
4987                 <links>
4988                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4989                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4990                 </links>
4991         </class>
4992         <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">
4993                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4994                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4995                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4996                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4997                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4998                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4999                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5000                 </fields>
5001                 <links>
5002                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5003                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5004                 </links>
5005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5006             <actions>
5007                 <create permission="CREATE_HOLD_NOTIFICATION">
5008                                         <context link="hold" jump="usr" field="home_ou" />
5009                                 </create>
5010                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5011                                         <context link="hold" jump="usr" field="home_ou" />
5012                                 </retrieve>
5013                 <update permission="CREATE_HOLD_NOTIFICATION">
5014                                         <context link="hold" jump="usr" field="home_ou" />
5015                                 </update>
5016                 <delete permission="CREATE_HOLD_NOTIFICATION">
5017                                         <context link="hold" jump="usr" field="home_ou" />
5018                                 </delete>
5019             </actions>
5020         </permacrud>
5021         </class>
5022         <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">
5023                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5024                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5025                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5026                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5027                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5028                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5029                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5030                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5031                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5032                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5033                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5034                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5035                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5036                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5037                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5038                 </fields>
5039                 <links>
5040                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5041                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5042                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5043                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5044                 </links>
5045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5046             <actions>
5047                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5048                 <retrieve/>
5049                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5050                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5051             </actions>
5052         </permacrud>
5053         </class>
5054         <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">
5055                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5056                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5057                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5058                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5059                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5060             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5061             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5062             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5063                 </fields>
5064                 <links>
5065                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5066                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5067                 </links>
5068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5069             <actions>
5070                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5071                 <retrieve/>
5072                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5073                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5074             </actions>
5075         </permacrud>
5076         </class>
5077         <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">
5078                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5079                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5080             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5081             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5082                 </fields>
5083                 <links>
5084                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5085                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5086                 </links>
5087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5088             <actions>
5089                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5090                                         <context link="lgroup" field="owner" />
5091                 </create>
5092                 <retrieve/>
5093                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5094                                         <context link="lgroup" field="owner" />
5095                 </update>
5096                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5097                                         <context link="lgroup" field="owner" />
5098                 </delete>
5099             </actions>
5100         </permacrud>
5101         </class>
5102
5103     <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">
5104         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5105             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5106             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5107             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5108             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5109         </fields>
5110         <links>
5111             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5112             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5113         </links>
5114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5115             <actions>
5116                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5117                 <retrieve/>
5118                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5119                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5120             </actions>
5121         </permacrud>
5122     </class>
5123
5124         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5125                 <fields>
5126                         <field name="sre_id" oils_persist:virtual="true" />
5127                         <field name="location" oils_persist:virtual="true" />
5128                         <field name="owning_lib" oils_persist:virtual="true" />
5129                         <field name="basic_holdings" oils_persist:virtual="true" />
5130                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5131                         <field name="supplement_holdings" oils_persist:virtual="true" />
5132                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5133                         <field name="index_holdings" oils_persist:virtual="true" />
5134                         <field name="index_holdings_add" oils_persist:virtual="true" />
5135                         <field name="online" oils_persist:virtual="true" />
5136                         <field name="missing" oils_persist:virtual="true" />
5137                         <field name="incomplete" oils_persist:virtual="true" />
5138                 </fields>
5139         </class>
5140
5141         <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">
5142                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5143                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5144                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5145                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5146                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5147                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5148                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5149                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5150                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5151                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5152                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5153                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5154                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5155                 </fields>
5156                 <links>
5157                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5158                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5159                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5160                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5161                 </links>
5162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5163                         <actions>
5164                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5165                                 <retrieve/>
5166                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5167                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5168                         </actions>
5169                 </permacrud>
5170         </class>
5171
5172         <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">
5173                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5174                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5175                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5176                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5177                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5178                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5179                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5180                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5181                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5182                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5183                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5184                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5185                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5186                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5187                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5188                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5189                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5190                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5191                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5192                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5193                 </fields>
5194                 <links>
5195                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5196                 </links>
5197                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5198                         <actions>
5199                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5200                                         <context link="subscription" field="owning_lib" />
5201                                 </create>
5202                                 <retrieve />
5203                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5204                                         <context link="subscription" field="owning_lib" />
5205                                 </update>
5206                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5207                                         <context link="subscription" field="owning_lib" />
5208                                 </delete>
5209                         </actions>
5210                 </permacrud>
5211         </class>
5212
5213         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5214                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5215                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5216                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5217                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5218                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5219                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5220                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5221                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5222                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5223                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5224                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5225                 </fields>
5226                 <links>
5227                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5228                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5229                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5230                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5231                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5232                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5233                 </links>
5234                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5235                         <actions>
5236                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5237                                 <retrieve />
5238                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5239                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5240                         </actions>
5241                 </permacrud>
5242         </class>
5243
5244         <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">
5245                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5246                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5247                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5248                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5249                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5250                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5251                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5252                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5253                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5254                 </fields>
5255                 <links>
5256                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5257                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5258                 </links>
5259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5260                         <actions>
5261                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5262                     <context link="subscription" field="owning_lib"/>
5263                 </create>
5264                                 <retrieve />
5265                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5266                     <context link="subscription" field="owning_lib"/>
5267                 </update>
5268                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5269                     <context link="subscription" field="owning_lib"/>
5270                 </delete>
5271                         </actions>
5272                 </permacrud>
5273         </class>
5274
5275         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5276                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5277                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5278                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5279                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5280                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5281                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5282                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5283                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5284                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5285                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5286                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5287                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5288                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5289                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5290                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5291                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5292                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5293                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5294                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5295                 </fields>
5296                 <links>
5297                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5298                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5299                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5300                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5301                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5302                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5303                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5304                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5305                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5306                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5307                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5308                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5309                 </links>
5310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5311                         <actions>
5312                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5313                                 <retrieve />
5314                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5315                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5316                         </actions>
5317                 </permacrud>
5318         </class>
5319
5320         <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">
5321                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5322                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5323                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5324                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5325                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5326                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5327                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5328                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5329                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5330                 </fields>
5331                 <links>
5332                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5333                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5334                 </links>
5335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5336                         <actions>
5337                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5338                                         <context link="distribution" field="holding_lib" />
5339                                 </create>
5340                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5341                                         <context link="distribution" field="holding_lib" />
5342                                 </retrieve>
5343                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5344                                         <context link="distribution" field="holding_lib" />
5345                                 </update>
5346                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5347                                         <context link="distribution" field="holding_lib" />
5348                                 </delete>
5349                         </actions>
5350                 </permacrud>
5351         </class>
5352
5353         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5354                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5355                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5356                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5357                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5358                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5359                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5360                 </fields>
5361                 <links>
5362                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5363                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5364                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5365                 </links>
5366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5367                         <actions>
5368                                 <create permission="ADMIN_SERIAL_STREAM">
5369                                         <context link="distribution" field="holding_lib" />
5370                                 </create>
5371                                 <retrieve />
5372                                 <update permission="ADMIN_SERIAL_STREAM">
5373                                         <context link="distribution" field="holding_lib" />
5374                                 </update>
5375                                 <delete permission="ADMIN_SERIAL_STREAM">
5376                                         <context link="distribution" field="holding_lib" />
5377                                 </delete>
5378                         </actions>
5379                 </permacrud>
5380         </class>
5381
5382         <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">
5383                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5384                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5385                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5386                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5387                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5388                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5389                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5390                 </fields>
5391                 <links>
5392                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5393                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5394                 </links>
5395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5396                         <actions>
5397                                 <create permission="ADMIN_SERIAL_STREAM">
5398                                         <context link="stream" jump="distribution" field="holding_lib" />
5399                                 </create>
5400                                 <retrieve permission="RECEIVE_SERIAL">
5401                                         <context link="stream" jump="distribution" field="holding_lib" />
5402                                 </retrieve>
5403                                 <update permission="ADMIN_SERIAL_STREAM">
5404                                         <context link="stream" jump="distribution" field="holding_lib" />
5405                                 </update>
5406                                 <delete permission="ADMIN_SERIAL_STREAM">
5407                                         <context link="stream" jump="distribution" field="holding_lib" />
5408                                 </delete>
5409                         </actions>
5410                 </permacrud>
5411         </class>
5412
5413         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5414                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5415                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5416                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5417                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5418                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5419                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5420                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5421                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5422                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5423                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5424                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5425                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5426                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5427                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5428                 </fields>
5429                 <links>
5430                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5431                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5432                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5433                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5434                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5435                 </links>
5436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5437                         <actions>
5438                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5439                                         <context link="subscription" field="owning_lib" />
5440                                 </create>
5441                                 <retrieve/>
5442                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5443                                         <context link="subscription" field="owning_lib" />
5444                                 </update>
5445                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5446                                         <context link="subscription" field="owning_lib" />
5447                                 </delete>
5448                         </actions>
5449                 </permacrud>
5450         </class>
5451
5452         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5453                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5454                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5455                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5456                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5457                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5458                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5459                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5460                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5461                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5462                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5463                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5464                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5465                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5466                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5467                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5468                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5469                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5470                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5471                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5472                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5473                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5474                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5475                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5476                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5477                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5478                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5479                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5480                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5481                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5482                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5483                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5484                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5485                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5486                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5487                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5488                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5489                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5490                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5491                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5492                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5493                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5494                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5495                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5496                 </fields>
5497                 <links>
5498                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5499                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5500                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5501                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5502                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5503                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5504                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5505                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5506                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5507                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5508                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5509                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5510                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5511                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5512                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5513                 </links>
5514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5515                         <actions>
5516                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5517                                 <retrieve/>
5518                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5519                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5520                         </actions>
5521                 </permacrud>
5522         </class>
5523
5524         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5525                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5526                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5527                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5528                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5529                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5530                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5531                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5532                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5533                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5534                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5535                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5536                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5537                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5538                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5539                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5540                 </fields>
5541                 <links>
5542                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5543                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5544                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5545                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5546                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5547                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5548                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5549                 </links>
5550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5551                         <actions>
5552                                 <create permission="ADMIN_SERIAL_ITEM">
5553                                         <context link="stream" jump="distribution" field="holding_lib" />
5554                                 </create>
5555                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5556                                         <context link="stream" jump="distribution" field="holding_lib" />
5557                                 </retrieve>
5558                                 <update permission="ADMIN_SERIAL_ITEM">
5559                                         <context link="stream" jump="distribution" field="holding_lib" />
5560                                 </update>
5561                                 <delete permission="ADMIN_SERIAL_ITEM">
5562                                         <context link="stream" jump="distribution" field="holding_lib" />
5563                                 </delete>
5564                         </actions>
5565                 </permacrud>
5566         </class>
5567
5568         <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">
5569                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5570                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5571                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5572                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5573                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5574                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5575                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5576                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5577                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5578                 </fields>
5579                 <links>
5580                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5581                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5582                 </links>
5583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5584                         <actions>
5585                                 <create permission="ADMIN_SERIAL_ITEM">
5586                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5587                                 </create>
5588                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5589                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5590                                 </retrieve>
5591                                 <update permission="ADMIN_SERIAL_ITEM">
5592                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5593                                 </update>
5594                                 <delete permission="ADMIN_SERIAL_ITEM">
5595                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5596                                 </delete>
5597                         </actions>
5598                 </permacrud>
5599         </class>
5600         <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">
5601                 <fields>
5602                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5603                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5604                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5605                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5606                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5607                 </fields>
5608                 <links>
5609                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5610                 </links>
5611         </class>
5612         <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">
5613                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5614                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5615                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5616                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5617                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5618                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5619                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5620                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5621                 </fields>
5622                 <links>
5623                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5624                 </links>
5625         </class>
5626         <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">
5627                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5628                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5629                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5630                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5631                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5632                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5633                 </fields>
5634                 <links>
5635                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5636                 </links>
5637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5638                         <actions>
5639                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5640                                         <context link="distribution" field="holding_lib" />
5641                                 </create>
5642                                 <retrieve/>
5643                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5644                                         <context link="distribution" field="holding_lib" />
5645                                 </update>
5646                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5647                                         <context link="distribution" field="holding_lib" />
5648                                 </delete>
5649                         </actions>
5650                 </permacrud>
5651         </class>
5652
5653         <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">
5654                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5655                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5656                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5657                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5658                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5659                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5660                 </fields>
5661                 <links>
5662                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5663                 </links>
5664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5665                         <actions>
5666                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5667                                         <context link="distribution" field="holding_lib" />
5668                                 </create>
5669                                 <retrieve/>
5670                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5671                                         <context link="distribution" field="holding_lib" />
5672                                 </update>
5673                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5674                                         <context link="distribution" field="holding_lib" />
5675                                 </delete>
5676                         </actions>
5677                 </permacrud>
5678         </class>
5679
5680         <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">
5681                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5682                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5683                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5684                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5685                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5686                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5687                 </fields>
5688                 <links>
5689                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5690                 </links>
5691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5692                         <actions>
5693                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5694                                         <context link="distribution" field="holding_lib" />
5695                                 </create>
5696                                 <retrieve/>
5697                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5698                                         <context link="distribution" field="holding_lib" />
5699                                 </update>
5700                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5701                                         <context link="distribution" field="holding_lib" />
5702                                 </delete>
5703                         </actions>
5704                 </permacrud>
5705         </class>
5706
5707         <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">
5708                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5709                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5710                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5711                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5712                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5713                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5714                 </fields>
5715                 <links>
5716                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5717                 </links>
5718                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5719                         <actions>
5720                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5721                                 <retrieve/>
5722                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5723                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5724                         </actions>
5725                 </permacrud>
5726         </class>
5727
5728         <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">
5729                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5730                         <field name="id" reporter:datatype="id" />
5731                         <field name="owning_copy" reporter:datatype="link"/>
5732                         <field name="stat_cat" reporter:datatype="link"/>
5733                         <field name="stat_cat_entry" reporter:datatype="link"/>
5734                 </fields>
5735                 <links>
5736                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5737                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5738                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5739                 </links>
5740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5741                         <actions>
5742                                 <retrieve/>
5743                         </actions>
5744                 </permacrud>
5745         </class>
5746         <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">
5747                 <fields oils_persist:primary="code">
5748                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5749                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5750                 </fields>
5751                 <links/>
5752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5753             <actions>
5754                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5755                 <retrieve/>
5756                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5757                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5758             </actions>
5759         </permacrud>
5760         </class>
5761         <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">
5762                 <fields oils_persist:primary="code">
5763                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5764                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5765                 </fields>
5766                 <links/>
5767         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5768             <actions>
5769                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5770                 <retrieve/>
5771                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5772                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5773             </actions>
5774         </permacrud>
5775         </class>
5776         <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">
5777                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5778                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5779                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5780                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5781                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5782                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5783                 </fields>
5784                 <links>
5785             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5786         </links>
5787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5788             <actions>
5789                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5790                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5791                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5792                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5793             </actions>
5794         </permacrud>
5795         </class>
5796         <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">
5797                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5798                         <field name="id" reporter:datatype="id" />
5799                         <field name="name" reporter:datatype="text"/>
5800                 </fields>
5801                 <links/>
5802         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5803             <actions>
5804                 <create permission="CREATE_LASSO" global_required="true"/>
5805                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5806                 <update permission="UPDATE_LASSO" global_required="true"/>
5807                 <delete permission="DELETE_LASSO" global_required="true"/>
5808             </actions>
5809         </permacrud>
5810         </class>
5811         <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">
5812                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5813                         <field name="id" reporter:datatype="id" />
5814                         <field name="lasso" reporter:datatype="link"/>
5815                         <field name="org_unit" reporter:datatype="org_unit"/>
5816                 </fields>
5817                 <links>
5818                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5819                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5820                 </links>
5821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5822             <actions>
5823                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5824                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5825                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5826                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5827             </actions>
5828         </permacrud>
5829         </class>
5830         <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">
5831                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5832                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5833                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5834                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5835                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5836                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5837                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5838                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5839                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5840                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5841                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5842                 </fields>
5843                 <links>
5844                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5845                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5846                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5847                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5848                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5849                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5850                 </links>
5851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5852             <actions>
5853                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5854                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5855                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5856                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5857             </actions>
5858         </permacrud>
5859         </class>
5860         <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">
5861                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5862                         <field name="id" reporter:datatype="id" />
5863                         <field name="from_org" reporter:datatype="org_unit"/>
5864                         <field name="to_org" reporter:datatype="org_unit"/>
5865                         <field name="prox" reporter:datatype="int" />
5866                 </fields>
5867                 <links>
5868                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5869                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5870                 </links>
5871         </class>
5872         <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">
5873                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5874                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5875                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5876                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5877                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5878                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5879                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5880                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5881                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5882                 </fields>
5883                 <links/>
5884         </class>
5885         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5886                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5887                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5888                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5889                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5890                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5891                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5892                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5893                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5894                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5895                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5896                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5897                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5898                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5899                 </fields>
5900                 <links>
5901                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5902                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5903                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5904                 </links>
5905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5906             <actions>
5907                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5908                 <retrieve/>
5909                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5910                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5911             </actions>
5912         </permacrud>
5913         </class>
5914         <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">
5915                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5916                         <field name="address_type"  reporter:datatype="text"/>
5917                         <field name="city"  reporter:datatype="text"/>
5918                         <field name="country"  reporter:datatype="text"/>
5919                         <field name="county"  reporter:datatype="text"/>
5920                         <field name="id" reporter:datatype="id" />
5921                         <field name="org_unit" reporter:datatype="org_unit"/>
5922                         <field name="post_code"  reporter:datatype="text"/>
5923                         <field name="state"  reporter:datatype="text"/>
5924                         <field name="street1"  reporter:datatype="text"/>
5925                         <field name="street2"  reporter:datatype="text"/>
5926                         <field name="valid" reporter:datatype="bool"/>
5927                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5928                 </fields>
5929                 <links>
5930                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5931                 </links>
5932         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5933             <actions>
5934                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5935                 <retrieve/>
5936                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5937                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5938             </actions>
5939         </permacrud>
5940         </class>
5941         <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">
5942                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5943                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5944                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5945                         <field name="query_text" reporter:datatype="text"/>
5946                 </fields>
5947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5948             <actions>
5949                 <retrieve/>
5950             </actions>
5951         </permacrud>
5952         </class>
5953
5954         <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">
5955                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5956                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5957                         <field name="owner" reporter:datatype="org_unit"/>
5958                         <field name="code" reporter:datatype="text"/>
5959                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5960                         <field name="create_date" reporter:datatype="timestamp"/>
5961                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5962                 </fields>
5963                 <links>
5964                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5965                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5966                 </links>
5967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5968             <actions>
5969                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5970                 <retrieve/>
5971                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5972                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5973             </actions>
5974         </permacrud>
5975         </class>
5976         <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">
5977                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5978                         <field name="id" reporter:datatype="id"/>
5979                         <field name="grp" reporter:datatype="link"/>
5980                         <field name="pos" reporter:datatype="int"/>
5981                         <field name="query" reporter:datatype="link"/>
5982                 </fields>
5983                 <links>
5984                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5985                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5986                 </links>
5987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5988             <actions>
5989                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5990                     <context link="grp" field="owner"/>
5991                 </create>
5992                 <retrieve/>
5993                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5994                     <context link="grp" field="owner"/>
5995                 </update>
5996                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5997                     <context link="grp" field="owner"/>
5998                 </delete>
5999             </actions>
6000         </permacrud>
6001         </class>
6002
6003         <!-- A note: Please update alhr and ahopl when updating ahr -->
6004         <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">
6005                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6006                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6007                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6008                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6009                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6010                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6011                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6012                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6013                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6014                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6015                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6016                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6017                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6018                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6019                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6020                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6021                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6022                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6023                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6024                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6025                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6026                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6027                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6028                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6029                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6030                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6031                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6032                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6033                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6034                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6035                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6036                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6037                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6038                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6039                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6040                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6041                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6042                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6043                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6044                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6045                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6046                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6047                 </fields>
6048                 <links>
6049                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6050                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6051                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6052                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6053                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6054                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6055                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6056                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6057                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6058                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6059                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6060                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6061                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6062                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6063                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6064                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6065                 </links>
6066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6067                         <actions>
6068                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6069                         </actions>
6070                 </permacrud>
6071         </class>
6072         <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">
6073                 <oils_persist:source_definition><![CDATA[
6074                 SELECT
6075                         ahr.*,
6076                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6077                                 copy_location_order_position,
6078                         CASE WHEN au.alias IS NOT NULL THEN
6079                                 au.alias
6080                         ELSE
6081                                 au.first_given_name
6082                         END AS usr_alias_or_first_given_name,
6083                         au.first_given_name AS usr_first_given_name,
6084                         au.second_given_name AS usr_second_given_name,
6085                         au.family_name AS usr_family_name,
6086                         au.prefix AS usr_prefix,
6087                         au.suffix AS usr_suffix,
6088                         au.alias AS usr_alias,
6089                         CASE WHEN au.alias IS NOT NULL THEN
6090                                 au.alias
6091                         ELSE
6092                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6093                                         COALESCE(au.family_name, ''),
6094                                         COALESCE(au.suffix, ''),
6095                                         ', ',
6096                                         COALESCE(au.prefix, ''),
6097                                         COALESCE(au.first_given_name, ''),
6098                                         COALESCE(au.second_given_name, '')
6099                                 ], ' '), E'\\s+,', ',')
6100                         END AS usr_alias_or_display_name,
6101                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6102                                 COALESCE(au.family_name, ''),
6103                                 COALESCE(au.suffix, ''),
6104                                 ', ',
6105                                 COALESCE(au.prefix, ''),
6106                                 COALESCE(au.first_given_name, ''),
6107                                 COALESCE(au.second_given_name, '')
6108                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6109                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6110                                 AS call_number_label,
6111                         siss.label AS issuance_label,
6112                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6113                         ahcm_1.copy_count AS potential_copies
6114                 FROM action.hold_request ahr
6115                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6116                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6117                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6118                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6119                 JOIN actor.usr au ON (au.id = ahr.usr)
6120                 JOIN (
6121                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6122                         FROM asset.copy_location
6123                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6124                 LEFT JOIN actor.usr_standing_penalty ausp 
6125                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6126                 LEFT JOIN config.standing_penalty csp
6127                         ON (
6128                                 csp.id = ausp.standing_penalty AND 
6129                                 csp.block_list LIKE '%CAPTURE%' AND (
6130                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6131                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6132                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6133                                         )
6134                                 )
6135                         )
6136                 JOIN (
6137                         SELECT COUNT(target_copy) AS copy_count, hold
6138                         FROM action.hold_copy_map
6139                         GROUP BY 2
6140                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6141                 LEFT JOIN serial.issuance siss
6142                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6143                 LEFT JOIN asset.copy_location_order acplo
6144                         ON (acp.location = acplo.location AND
6145                                 acp.circ_lib = acplo.org)
6146                 WHERE
6147                         ahr.capture_time IS NULL AND
6148                         ahr.cancel_time IS NULL AND
6149                         csp.id IS NULL AND
6150                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6151                         acp.status IN (0,7)
6152                 ]]></oils_persist:source_definition>
6153                 <fields oils_persist:primary="id">
6154                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6155                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6156                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6157                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6158                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6159                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6160                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6161                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6162                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6163                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6164                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6165                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6166                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6167                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6168                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6169                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6170                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6171                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6172                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6173                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6174                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6175                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6176                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6177                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6178                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6179                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6180                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6181                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6182                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6183                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6184                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6185                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6186                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6187                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6188                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6189                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6190                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6191                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6192                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6193                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6194                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6195                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6196                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6197                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6198                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6199                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6200                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6201                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6202                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6203                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6204                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6205                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6206                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6207                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6208                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6209                 </fields>
6210                 <links>
6211                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6212                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6213                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6214                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6215                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6216                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6217                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6218                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6219                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6220                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6221                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6222                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6223                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6224                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6225                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6226                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6227                 </links>
6228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6229                         <actions>
6230                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6231                         </actions>
6232                 </permacrud>
6233         </class>
6234         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6235                 <oils_persist:source_definition>
6236                         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)
6237                 </oils_persist:source_definition>
6238                 <fields oils_persist:primary="id">
6239                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6240                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6241                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6242                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6243                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6244                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6245                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6246                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6247                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6248                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6249                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6250                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6251                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6252                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6253                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6254                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6255                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6256                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6257                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6258                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6259                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6260                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6261                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6262                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6263                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6264                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6265                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6266                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6267                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6268                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6269                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6270                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6271                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6272                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6273                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6274                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6275                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6276                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6277                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6278                 </fields>
6279                 <links>
6280                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6281                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6282                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6283                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6284                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6285                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6286                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6287                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6288                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6289                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6290                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6291                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6292                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6293                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6294                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6295                 </links>
6296         </class>
6297
6298         <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">
6299                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6300                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6301                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6302                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6303                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6304                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6305                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6306                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6307                 </fields>
6308                 <links>
6309                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6310                 </links>
6311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6312                         <actions>
6313                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6314                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6315                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6316                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6317                         </actions>
6318                 </permacrud>
6319         </class>
6320         <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">
6321                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6322                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6323                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6324                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6325                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6326                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6327                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6328                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6329                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6330                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6331                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6332                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6333                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6334                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6335                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6336                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6337                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6338                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6339                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6340                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6341                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6342                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6343                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6344                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6345                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6346                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6347                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6348                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6349                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6350                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6351                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6352                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6353                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6354                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6355                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6356                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6357                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6358                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6359                 </fields>
6360                 <links>
6361                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6362                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6363                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6364                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6365                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6366                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6367                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6368                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6369                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6370                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6371                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6372                 </links>
6373                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6374                         <actions>
6375                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6376                         </actions>
6377                 </permacrud>
6378         </class>
6379         <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">
6380                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6381                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6382                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6383                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6384                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6385                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6386                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6387                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6388                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6389                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6390                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6391                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6392                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6393                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6394                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6395                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6396                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6397                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6398                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6399                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6400                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6401                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6402                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6403                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6404                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6405                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6406                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6407                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6408                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6409                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6410                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6411                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6412                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6413                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6414                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6415                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6416                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6417                 </fields>
6418                 <links>
6419                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6420                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6421                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6422                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6423                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6424                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6425                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6426                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6427                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6428                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6429                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6430                 </links>
6431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6432                         <actions>
6433                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6434                         </actions>
6435                 </permacrud>
6436         </class>
6437
6438         <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">
6439                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6440                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6441                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6442                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6443                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6444                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6445                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6446                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6447                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6448                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6449                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6450                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6451                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6452                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6453                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6454                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6455                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6456                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6457                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6458                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6459                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6460                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6461                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6462                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6463                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6464                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6465                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6466                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6467                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6468                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6469                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6470                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6471                 </fields>
6472                 <links>
6473                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6474                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6475                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6476                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6477                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6478                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6479                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6480                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6481                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6482                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6483                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6484                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6485                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6486                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6487                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6488                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6489                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6490                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6491                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6492                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6493                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6494                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6495                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6496                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6497                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6498                 </links>
6499         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6500             <actions>
6501                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6502                 <retrieve />
6503                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6504                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6505             </actions>
6506         </permacrud>
6507         </class>
6508         <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">
6509                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6510                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6511                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6512                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6513                 </fields>
6514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6515                         <actions>
6516                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6517                                 <retrieve/>
6518                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6519                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6520                         </actions>
6521                 </permacrud>
6522         </class>
6523         <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">
6524                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6525                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6526                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6527                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6528                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6529                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6530                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6531                 </fields>
6532                 <links>
6533                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6534                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6535                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6536                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6537                 </links>
6538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6539                         <actions>
6540                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6541                                 <retrieve/>
6542                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6543                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6544                         </actions>
6545                 </permacrud>
6546         </class>
6547         <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">
6548                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6549                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6550                         <field name="btype" reporter:datatype="text"/>
6551                         <field name="id" reporter:datatype="id" />
6552                         <field name="name"  reporter:datatype="text"/>
6553                         <field name="description" reporter:datatype="text"/>
6554                         <field name="owner" reporter:datatype="link"/>
6555                         <field name="pub" reporter:datatype="bool"/>
6556                         <field name="create_time" reporter:datatype="timestamp" />
6557                         <field name="owning_lib" reporter:datatype="org_unit" />
6558                 </fields>
6559                 <links>
6560                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6561                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6562                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6563                 </links>
6564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6565                         <actions>
6566                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6567                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6568                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6569                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6570                         </actions>
6571                 </permacrud>
6572         </class>
6573         <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">
6574                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6575                         <field name="id" reporter:datatype="id" />
6576                         <field name="bucket" reporter:datatype="link"/>
6577                         <field name="note" reporter:datatype="text" />
6578                 </fields>
6579                 <links>
6580                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6581                 </links>
6582         </class>
6583         <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">
6584                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6585                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6586                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6587                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6588                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6589                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6590                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6591                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6592                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6593                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6594                 </fields>
6595                 <links>
6596                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6597                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6598                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6599                 </links>
6600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6601                         <actions>
6602                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6603                         </actions>
6604                 </permacrud>
6605         </class>
6606         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6608                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6609                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6610                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6611                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6612                 </fields>
6613                 <links>
6614                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6615                 </links>
6616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6617                         <actions>
6618                                 <retrieve permission="VIEW_USER">
6619                                         <context link="usr" field="home_ou" />
6620                                 </retrieve>
6621                         </actions>
6622                 </permacrud>
6623         </class>
6624     <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">
6625         <fields oils_persist:primary="field">
6626             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6627             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6628             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6629         </fields>
6630         <links/>
6631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6632             <actions>
6633                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6634                 <retrieve />
6635                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6636                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6637             </actions>
6638         </permacrud>
6639     </class>
6640         <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">
6641                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6642                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6643                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6644                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6645                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6646                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6647                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6648                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6649                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6650                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6651                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6652                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6653                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6654                 </fields>
6655                 <links>
6656                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6657                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6658                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6659                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6660                 </links>
6661         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6662             <actions>
6663                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6664                 <retrieve />
6665                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6666                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6667             </actions>
6668         </permacrud>
6669         </class>
6670         <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">
6671                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6672                         <field name="field" reporter:datatype="link"/>
6673                         <field name="id" reporter:datatype="id" />
6674                         <field name="source" reporter:datatype="link"/>
6675                         <field name="value"  reporter:datatype="text"/>
6676                 </fields>
6677                 <links>
6678                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6679                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6680                 </links>
6681         </class>
6682         <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">
6683                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6684                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6685                         <field name="btype" reporter:datatype="text"/>
6686                         <field name="id" reporter:datatype="id" />
6687                         <field name="name"  reporter:datatype="text"/>
6688                         <field name="description" reporter:datatype="text"/>
6689                         <field name="owner" reporter:datatype="link"/>
6690                         <field name="pub" reporter:datatype="bool"/>
6691                         <field name="create_time" reporter:datatype="timestamp" />
6692                         <field name="owning_lib" reporter:datatype="org_unit" />
6693                 </fields>
6694                 <links>
6695                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6696                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6697                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6698                 </links>
6699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6700                         <actions>
6701                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6702                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6703                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6704                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6705                         </actions>
6706                 </permacrud>
6707         </class>
6708         <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">
6709                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6710                         <field name="id" reporter:datatype="id" />
6711                         <field name="bucket" reporter:datatype="link"/>
6712                         <field name="note" reporter:datatype="text" />
6713                 </fields>
6714                 <links>
6715                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6716                 </links>
6717         </class>
6718         <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">
6719                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6720                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6721                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6722                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6723                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6724                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6725                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6726                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6727                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6728                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6729                 </fields>
6730                 <links>
6731                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6732                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6733                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6734                 </links>
6735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6736             <actions>
6737                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6738                     <context link="xact" jump="usr" field="home_ou"/>
6739                 </retrieve>
6740                         </actions>
6741                 </permacrud>
6742         </class>
6743         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6744                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6745                         <field name="id" reporter:datatype="id" />
6746                         <field name="ind1" />
6747                         <field name="ind2" />
6748                         <field name="record" />
6749                         <field name="subfield" />
6750                         <field name="tag" />
6751                         <field name="value" />
6752                 </fields>
6753                 <links>
6754                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6755                 </links>
6756         </class>
6757         <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">
6758                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6759                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6760                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6761                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6762                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6763                 </fields>
6764                 <links>
6765                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6766                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6767                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6768                 </links>
6769         </class>
6770         <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">
6771                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6772                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6773                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6774                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6775                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6776                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6777                 </fields>
6778                 <links>
6779                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6780                 </links>
6781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6782             <actions>
6783                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6784                 <retrieve/>
6785                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6786                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6787             </actions>
6788         </permacrud>
6789
6790         </class>
6791         <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">
6792                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6793                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6794                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6795                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6796                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6797                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6798                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6799                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6800                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6801                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6802                 </fields>
6803                 <links>
6804                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6805                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6806                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6807                 </links>
6808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6809             <actions>
6810                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6811                 <retrieve/>
6812                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6813                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6814             </actions>
6815         </permacrud>
6816         </class>
6817         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6818                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6819                         <field name="create_date" reporter:datatype="timestamp"/>
6820                         <field name="creator" reporter:datatype="link"/>
6821                         <field name="edit_date" reporter:datatype="timestamp"/>
6822                         <field name="editor" reporter:datatype="link"/>
6823                         <field name="id" reporter:datatype="id" />
6824                         <field name="pub" reporter:datatype="bool"/>
6825                         <field name="record" reporter:datatype="link"/>
6826                         <field name="value"  reporter:datatype="text"/>
6827                 </fields>
6828                 <links>
6829                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6830                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6831                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6832                 </links>
6833         </class>
6834         <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">
6835                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6836                         <field name="balance_owed" reporter:datatype="money" />
6837                         <field name="total_owed" reporter:datatype="money" />
6838                         <field name="total_paid" reporter:datatype="money" />
6839                         <field name="usr" reporter:datatype="link"/>
6840                 </fields>
6841                 <links>
6842                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6843                 </links>
6844         </class>
6845     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6846                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6847                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6848                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6849                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6850                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6851                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6852                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6853                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6854                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6855                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6856                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6857                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6858                 </fields>
6859                 <links>
6860                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6861                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6862                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6863                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6864                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6865                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6866                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6867                 </links>
6868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6869             <actions>
6870                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
6871             </actions>
6872         </permacrud>
6873         </class>
6874         <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">
6875                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6876                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6877                         <field name="quality" reporter:datatype="int" />
6878                         <field name="source" reporter:datatype="text"/>
6879                         <field name="transcendant" reporter:datatype="bool"/>
6880                         <field name="can_have_copies" reporter:datatype="bool"/>
6881                 </fields>
6882                 <links/>
6883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6884             <actions>
6885                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6886                 <retrieve/>
6887                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6888                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6889             </actions>
6890         </permacrud>
6891         </class>
6892         <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">
6893                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6894                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6895                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6896                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6897                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6898                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6899                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6900                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6901                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6902                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6903                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6904                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6905                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6906                 </fields>
6907                 <links>
6908                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6909                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6910                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6911                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6912                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6913                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6914                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6915                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
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="usr" field="home_ou" />
6921                                 </retrieve>
6922                         </actions>
6923                 </permacrud>
6924         </class>
6925         <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">
6926                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6927                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6928                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6929                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6930                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6931                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6932                 </fields>
6933                 <links>
6934                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6935                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6936                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6937                 </links>
6938         </class>
6939         <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">
6940                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6941                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6942                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6943                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6944                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6945                 </fields>
6946                 <links>
6947                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6948                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6949                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6950                 </links>
6951         </class>
6952         <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">
6953                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6954                         <field name="bucket" reporter:datatype="link"/>
6955                         <field name="id" reporter:datatype="id" />
6956                         <field name="target_user" reporter:datatype="link"/>
6957                         <field name="create_time" reporter:datatype="timestamp" />
6958                         <field name="pos" reporter:datatype="int" />
6959                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6960                 </fields>
6961                 <links>
6962                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6963                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6964             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6965                 </links>
6966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6967                         <actions>
6968                                 <retrieve permission="ADMIN_USER_BUCKET">
6969                     <context link="bucket" owning_lib="owning_lib"/>
6970                 </retrieve>
6971             </actions>
6972         </permacrud>
6973         </class>
6974         <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">
6975                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6976                         <field name="id" reporter:datatype="id" />
6977                         <field name="item" reporter:datatype="link"/>
6978                         <field name="note" reporter:datatype="text" />
6979                 </fields>
6980                 <links>
6981                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6982                 </links>
6983         </class>
6984         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6985                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6986                         <field name="balance_owed" reporter:datatype="money" />
6987                         <field name="total_owed" reporter:datatype="money" />
6988                         <field name="total_paid" reporter:datatype="money" />
6989                         <field name="usr" reporter:datatype="link"/>
6990                 </fields>
6991                 <links>
6992                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6993                 </links>
6994         </class>
6995         <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">
6996                 <fields oils_persist:primary="code" oils_persist:sequence="">
6997                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6998                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6999                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7000                 </fields>
7001                 <links/>
7002         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7003             <actions>
7004                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7005                 <retrieve/>
7006                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7007                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7008             </actions>
7009         </permacrud>
7010         </class>
7011         <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">
7012                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7013                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7014                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7015                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7016                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7017                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7018                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7019                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7020                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7021                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7022                 </fields>
7023                 <links>
7024                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7025                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7026                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7027                 </links>
7028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7029             <actions>
7030                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7031                     <context link="xact" jump="usr" field="home_ou"/>
7032                 </retrieve>
7033                         </actions>
7034                 </permacrud>
7035         </class>
7036         <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">
7037                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7038                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7039                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7040                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7041                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7042                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7043                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7044                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7045                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7046                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7047                 </fields>
7048                 <links>
7049                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7050                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7051                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7052                 </links>
7053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7054             <actions>
7055                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7056                     <context link="xact" jump="usr" field="home_ou"/>
7057                 </retrieve>
7058                         </actions>
7059                 </permacrud>
7060         </class>
7061         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7062                 <fields oils_persist:primary="id" oils_persist:sequence="">
7063                         <field name="checkin_lib" reporter:datatype="link"/>
7064                         <field name="checkin_staff" reporter:datatype="link"/>
7065                         <field name="checkin_time" reporter:datatype="timestamp"/>
7066                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7067                         <field name="circ_staff" reporter:datatype="link"/>
7068                         <field name="desk_renewal" reporter:datatype="bool"/>
7069                         <field name="due_date" reporter:datatype="timestamp"/>
7070                         <field name="duration" reporter:datatype="interval"/>
7071                         <field name="duration_rule" reporter:datatype="link"/>
7072                         <field name="fine_interval" reporter:datatype="interval"/>
7073                         <field name="id" reporter:datatype="id" />
7074                         <field name="max_fine" reporter:datatype="money" />
7075                         <field name="max_fine_rule" reporter:datatype="link"/>
7076                         <field name="opac_renewal" reporter:datatype="bool"/>
7077                         <field name="phone_renewal" reporter:datatype="bool"/>
7078                         <field name="recurring_fine" reporter:datatype="money" />
7079                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7080                         <field name="renewal_remaining" reporter:datatype="int" />
7081             <field name="grace_period" reporter:datatype="interval" />
7082                         <field name="stop_fines" reporter:datatype="text"/>
7083                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7084                         <field name="target_copy" reporter:datatype="link"/>
7085                         <field name="usr" reporter:datatype="link"/>
7086                         <field name="xact_finish" reporter:datatype="timestamp" />
7087                         <field name="xact_start" reporter:datatype="timestamp" />
7088                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7089                 </fields>
7090                 <links>
7091                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7092                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7093                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7094                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7095                 </links>
7096         </class>
7097         <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">
7098                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7099                         <field name="field" reporter:datatype="link"/>
7100                         <field name="id" reporter:datatype="id" />
7101                         <field name="source" reporter:datatype="link"/>
7102                         <field name="value" reporter:datatype="text"/>
7103                 </fields>
7104                 <links>
7105                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7106                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7107                 </links>
7108         </class>
7109         <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">
7110                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7111                         <field name="high" reporter:datatype="money" />
7112                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7113                         <field name="low" reporter:datatype="money" />
7114                         <field name="name" reporter:datatype="text"/>
7115                         <field name="normal" reporter:datatype="money" />
7116                         <field name="recurrence_interval" reporter:datatype="interval"/>
7117             <field name="grace_period" reporter:datatype="interval" />
7118                 </fields>
7119                 <links/>
7120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7121             <actions>
7122                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7123                 <retrieve/>
7124                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7125                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7126             </actions>
7127         </permacrud>
7128         </class>
7129         <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">
7130                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7131                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7132                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7133                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7134                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7135                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7136                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7137                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7138                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7139                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7140                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7141                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7142                 </fields>
7143                 <links>
7144                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7145                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7146                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7147                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7148                 </links>
7149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7150             <actions>
7151                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7152                     <context link="xact" jump="usr" field="home_ou"/>
7153                 </retrieve>
7154                         </actions>
7155                 </permacrud>
7156         </class>
7157         <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">
7158                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7159                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7160                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7161                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7162                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7163                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
7164                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7165                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7166                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7167                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7168                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7169                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7170                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7171                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7172                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7173                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7174                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7175                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7176                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7177                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7178                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7179                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7180                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7181                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7182                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7183                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7184                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7185                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7186                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7187                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7188                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7189                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7190                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7191                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7192                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7193                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7194                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7195                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7196                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7197                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7198                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7199                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7200                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7201                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7202                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7203                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7204                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7205                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7206                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7208                 </fields>
7209                 <links>
7210                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7211                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7212                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7213                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7214                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7215                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7216                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7217                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7218                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7219                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7220                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7221                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7222                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7223                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7224                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7225                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7226                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7227                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7228                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7229                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7230                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7231                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7232                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7233                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7234                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7235                 </links>
7236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7237             <actions>
7238                 <create permission="CREATE_COPY">
7239                     <context link="call_number" field="owning_lib"/>
7240                 </create>
7241                 <retrieve/>
7242                 <update permission="UPDATE_COPY">
7243                     <context link="call_number" field="owning_lib"/>
7244                 </update>
7245                 <delete permission="DELETE_COPY">
7246                     <context link="call_number" field="owning_lib"/>
7247                 </delete>
7248             </actions>
7249         </permacrud>
7250         </class>
7251
7252         <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">
7253                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7254                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7255                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7256                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7257                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7258                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7259                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7260                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7261                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7262                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7263                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7264                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7265                 </fields>
7266                 <links>
7267                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7268                 </links>
7269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7270             <actions>
7271                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7272                 <retrieve/>
7273                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7274                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7275             </actions>
7276         </permacrud>
7277         </class>
7278
7279         <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">
7280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7281                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7282                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7283                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7284                 </fields>
7285                 <links>
7286                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7287                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7288                 </links>
7289         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7290             <actions>
7291                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7292                 <retrieve/>
7293                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7294                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7295             </actions>
7296         </permacrud>
7297         </class>
7298
7299         <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">
7300                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7301                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7302                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7303                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7304                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7305                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7306                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7307                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7308                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7309                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7310                 </fields>
7311                 <links>
7312                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7313                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7314                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7315                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7316                 </links>
7317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7318             <actions>
7319                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7320                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7321                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7322                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7323             </actions>
7324         </permacrud>
7325         </class>
7326
7327         <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">
7328                 <fields oils_persist:primary="id">
7329                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7330                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7331                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7332                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7333                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7334                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7335                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7336                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7337                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7338                 </fields>
7339                 <links>
7340                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7341                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7342                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7343                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7344                 </links>
7345         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7346             <actions>
7347                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7348                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7349                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7350                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7351             </actions>
7352         </permacrud>
7353         </class>
7354
7355         <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">
7356                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7357                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7358                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7359                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7360                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7361                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7362                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7363                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7364                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7365                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7366                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7367                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7368                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7369                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7370                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7371                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7372                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7373                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7374                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7375                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7376                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7377                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7378                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7379                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7380                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7381                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7382                 </fields>
7383                 <links>
7384                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7385                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7386                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7387                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7388                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7389                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7390                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7391                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7392                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7393                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7394                 </links>
7395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7396                         <actions>
7397                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7398                                 <retrieve />
7399                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7400                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7401                         </actions>
7402                 </permacrud>
7403         </class>
7404
7405         <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">
7406                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7407                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7408                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7409                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7410                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7411                 </fields>
7412                 <links/>
7413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7414             <actions>
7415                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7416                 <retrieve/>
7417                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7418                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7419             </actions>
7420         </permacrud>
7421         </class>
7422         <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">
7423                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7424                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7425                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7426                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7427                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7428                 </fields>
7429                 <links/>
7430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7431             <actions>
7432                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7433                 <retrieve/>
7434                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7435                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7436             </actions>
7437         </permacrud>
7438         </class>
7439         <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">
7440                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7441                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7442                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7443                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7444                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7445                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7446                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7447                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7448                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7449                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7450                 </fields>
7451                 <links>
7452                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7453                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7454                 </links>
7455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7456             <actions>
7457                 <create permission="CREATE_PERM" global_required="true"/>
7458                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7459                 <update permission="UPDATE_PERM" global_required="true"/>
7460                 <delete permission="DELETE_PERM" global_required="true"/>
7461             </actions>
7462         </permacrud>
7463         </class>
7464         <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">
7465                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7466                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7467                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7468                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7469                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7470                 </fields>
7471                 <links>
7472                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7473                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7474                 </links>
7475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7476             <actions>
7477                 <create permission="ADMIN_SURVEY">
7478                     <context link="question" jump="survey" field="owner"/>
7479                 </create>
7480                 <retrieve/>
7481                 <update permission="ADMIN_SURVEY">
7482                     <context link="question" jump="survey" field="owner"/>
7483                 </update>
7484                 <delete permission="ADMIN_SURVEY">
7485                     <context link="question" jump="survey" field="owner"/>
7486                 </delete>
7487             </actions>
7488         </permacrud>
7489         </class>
7490         <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">
7491                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7492                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7493                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7494                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7495                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7496                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7497                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7498                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7499                 </fields>
7500                 <links>
7501                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7502                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7503                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7504                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7505                 </links>
7506                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7507                         <actions>
7508                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7509                         </actions>
7510                 </permacrud>
7511         </class>
7512         <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">
7513                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7514                         <field name="balance_owed" reporter:datatype="money" />
7515                         <field name="total_owed" reporter:datatype="money" />
7516                         <field name="total_paid" reporter:datatype="money" />
7517                         <field name="usr" reporter:datatype="link"/>
7518                 </fields>
7519                 <links>
7520                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7521                 </links>
7522         </class>
7523         <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">
7524                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7525                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7526                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7527                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7528                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7529                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7530                 </fields>
7531                 <links>
7532                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7533                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7534                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7535                 </links>
7536         </class>
7537         <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">
7538                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7539                         <field name="field" reporter:datatype="link"/>
7540                         <field name="id" reporter:datatype="id" />
7541                         <field name="source" reporter:datatype="link"/>
7542                         <field name="value" reporter:datatype="text"/>
7543                 </fields>
7544                 <links>
7545                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7546                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7547                 </links>
7548         </class>
7549         <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">
7550                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7551                         <field name="field" reporter:datatype="link"/>
7552                         <field name="id" reporter:datatype="id" />
7553                         <field name="source" reporter:datatype="link"/>
7554                         <field name="value" reporter:datatype="text"/>
7555                 </fields>
7556                 <links>
7557                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7558                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7559                 </links>
7560         </class>
7561         <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">
7562                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7563                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7564                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7565                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7566                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7567                 </fields>
7568                 <links>
7569                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7570                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7571                 </links>
7572         </class>
7573         <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">
7574                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7575                         <field name="depth" reporter:datatype="int" />
7576                         <field name="grantable" reporter:datatype="bool"/>
7577                         <field name="grp" reporter:datatype="link"/>
7578                         <field name="id" reporter:datatype="id" />
7579                         <field name="perm" reporter:datatype="link"/>
7580                 </fields>
7581                 <links>
7582                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7583                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7584                 </links>
7585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7586             <actions>
7587                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7588                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7589                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7590                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7591             </actions>
7592         </permacrud>
7593         </class>
7594         <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">
7595                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7596                         <field name="items" oils_persist:virtual="true" />
7597                         <field name="btype" reporter:datatype="text"/>
7598                         <field name="id" reporter:datatype="id" />
7599                         <field name="name" reporter:datatype="text"/>
7600                         <field name="description" reporter:datatype="text"/>
7601                         <field name="owner" reporter:datatype="link"/>
7602                         <field name="pub" reporter:datatype="bool"/>
7603                         <field name="create_time" reporter:datatype="timestamp" />
7604                         <field name="owning_lib" reporter:datatype="org_unit" />
7605                 </fields>
7606                 <links>
7607                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7608                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7609                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7610                 </links>
7611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7612                         <actions>
7613                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7614                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7615                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7616                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7617                         </actions>
7618                 </permacrud>
7619         </class>
7620         <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">
7621                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7622                         <field name="id" reporter:datatype="id" />
7623                         <field name="bucket" reporter:datatype="link"/>
7624                         <field name="note" reporter:datatype="text" />
7625                 </fields>
7626                 <links>
7627                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7628                 </links>
7629         </class>
7630         <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">
7631                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7632                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7633                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7634                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7635                 </fields>
7636                 <links>
7637                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7638                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7639                 </links>
7640         </class>
7641         <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">
7642                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7643                         <field name="depth" reporter:datatype="int"/>
7644                         <field name="grantable" reporter:datatype="bool"/>
7645                         <field name="id" reporter:datatype="id" />
7646                         <field name="perm" reporter:datatype="link"/>
7647                         <field name="usr" reporter:datatype="link"/>
7648                 </fields>
7649                 <links>
7650                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7651                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7652                 </links>
7653         </class>
7654         <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">
7655                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7656                         <field name="object_id" reporter:datatype="text"/>
7657                         <field name="grantable" reporter:datatype="bool"/>
7658                         <field name="id" reporter:datatype="id" />
7659                         <field name="perm" reporter:datatype="link"/>
7660                         <field name="usr" reporter:datatype="link"/>
7661                         <field name="object_type" reporter:datatype="text"/>
7662                 </fields>
7663                 <links>
7664                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7665                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7666                 </links>
7667         </class>
7668         <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">
7669                 <fields oils_persist:primary="id" oils_persist:sequence="">
7670                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7671                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7672                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7673                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7674                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7675                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7676                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7677                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7678                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7679                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7680                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7681                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7682                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7683                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7684                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7685                 </fields>
7686                 <links>
7687                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7688                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7689                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7690                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7691                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7692                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7693                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7694                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7695                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7696                 </links>
7697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7698             <actions>
7699                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7700                     <context link="xact" jump="usr" field="home_ou"/>
7701                 </retrieve>
7702                         </actions>
7703                 </permacrud>
7704         </class>
7705         <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">
7706                 <fields oils_persist:primary="id" oils_persist:sequence="">
7707                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7708                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7709                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7710                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7711                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7712                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7713                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7714                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7715                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7716                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7717                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7718                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7719                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7720                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7721                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7722                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7723                 </fields>
7724                 <links>
7725                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7726                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7727                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7728                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7729                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7730                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7731                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7732                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7733                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7734                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7735                 </links>
7736                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7737                         <actions>
7738                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7739                                         <context link="xact" jump="usr" field="home_ou"/>
7740                                 </retrieve>
7741                         </actions>
7742                 </permacrud>
7743         </class>
7744         <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">
7745                 <fields oils_persist:primary="id" oils_persist:sequence="">
7746                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7747                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7748                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7749                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7750                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7751                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7752                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7753                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7754                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7755                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7756                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7757                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7758                 </fields>
7759                 <links>
7760                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7761                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7762                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7763                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7764                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7765                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7766                 </links>
7767         </class>
7768         <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">
7769                 <fields oils_persist:primary="id" oils_persist:sequence="">
7770                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7771                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7772                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7773                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7774                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7775                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7776                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7777                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7778                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7779                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7780                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7781                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7782                 </fields>
7783                 <links>
7784                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7785                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7786                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7787                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7788                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7789                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7790                 </links>
7791         </class>
7792         <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">
7793                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7794                         <field name="bucket" reporter:datatype="link"/>
7795                         <field name="id" reporter:datatype="id" />
7796                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7797                         <field name="create_time" reporter:datatype="timestamp" />
7798                         <field name="pos" reporter:datatype="int" />
7799                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7800                 </fields>
7801                 <links>
7802                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7803                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7804             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7805                 </links>
7806                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7807                         <actions>
7808                                 <retrieve permission="ADMIN_COPY_BUCKET">
7809                     <context link="bucket" owning_lib="owning_lib"/>
7810                 </retrieve>
7811             </actions>
7812         </permacrud>
7813         </class>
7814         <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">
7815                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7816                         <field name="id" reporter:datatype="id" />
7817                         <field name="item" reporter:datatype="link"/>
7818                         <field name="note" reporter:datatype="text" />
7819                 </fields>
7820                 <links>
7821                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7822                 </links>
7823         </class>
7824         <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">
7825                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7826                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7827                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7828                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7829                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7830                 </fields>
7831                 <links>
7832                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7833                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7834                 </links>
7835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7836                         <actions>
7837                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7838                         </actions>
7839                 </permacrud>
7840         </class>
7841     <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">
7842         <fields oils_persist:primary="field">
7843             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7844             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7845             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7846         </fields>
7847         <links/>
7848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7849             <actions>
7850                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7851                 <retrieve />
7852                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7853                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7854             </actions>
7855         </permacrud>
7856     </class>
7857         <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">
7858                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7859                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7860                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7861                 </fields>
7862                 <links/>
7863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7864             <actions>
7865                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7866                 <retrieve/>
7867                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7868                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7869             </actions>
7870         </permacrud>
7871         </class>
7872
7873
7874         <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">
7875                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7876                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7877                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7878                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7879                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7880                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7881                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7882                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7883                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7884                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7885                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7886                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7887                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7888                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7889                 </fields>
7890                 <links>
7891                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7892                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7893                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7894                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7895                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7896                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7897                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7898                 </links>
7899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7900             <actions>
7901                 <create permission="TRANSIT_COPY">
7902                     <context link="target_copy" field="owner"/>
7903                 </create>
7904                 <retrieve/>
7905                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7906                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7907             </actions>
7908         </permacrud>
7909         </class>
7910         <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">
7911                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7912                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7913                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7914                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7915                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7916                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7917                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7918                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7919                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7920                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7921                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7922                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7923                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7924                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7925                 </fields>
7926                 <links>
7927                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7928                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7929                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7930                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7931                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7932                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7933                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7934                 </links>
7935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7936             <actions>
7937                 <create permission="TRANSIT_COPY" context_field="owner">
7938                     <context link="target_copy" field="circ_lib"/>
7939                 </create>
7940                 <retrieve/>
7941                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7942                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7943             </actions>
7944         </permacrud>
7945         </class>
7946         <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">
7947                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7948                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7949                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7950                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7951                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7952                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7953                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7954                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7955                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7956                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7957                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7958                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7959                 </fields>
7960                 <links>
7961                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7962                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7963                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7964                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7965                 </links>
7966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7967             <actions>
7968                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7969                     <context link="xact" jump="usr" field="home_ou"/>
7970                 </retrieve>
7971                         </actions>
7972                 </permacrud>
7973         </class>
7974         <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">
7975                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7976                         <field name="grp" />
7977                         <field name="id" reporter:datatype="id" />
7978                         <field name="usr" />
7979                 </fields>
7980                 <links>
7981                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7982                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7983                 </links>
7984         </class>
7985         <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">
7986                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7987                         <field name="id" reporter:datatype="id" />
7988                         <field name="fq_field" reporter:datatype="text"/>
7989                         <field name="identity_value" reporter:datatype="text"/>
7990                         <field name="translation" reporter:datatype="text"/>
7991                         <field name="string" reporter:datatype="text"/>
7992                 </fields>
7993                 <links>
7994                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7995                 </links>
7996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7997             <actions>
7998                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7999                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8000                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8001                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8002             </actions>
8003         </permacrud>
8004         </class>
8005         <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">
8006                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8007                         <field name="id" reporter:datatype="id" />
8008                         <field name="fm_class" reporter:datatype="text"/>
8009                         <field name="field" reporter:datatype="text"/>
8010                         <field name="owner" reporter:datatype="org_unit"/>
8011                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8012                 </fields>
8013                 <links>
8014                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8015                 </links>
8016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8017             <actions>
8018                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8019                 <retrieve/>
8020                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8021                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8022             </actions>
8023         </permacrud>
8024         </class>
8025         <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">
8026                 <fields oils_persist:primary="code">
8027                         <field name="code" reporter:datatype="id" />
8028                         <field name="marc_code" reporter:datatype="text"/>
8029                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8030                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8031                         <field name="rtl" reporter:datatype="bool"/>
8032                 </fields>
8033                 <links/>
8034         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8035             <actions>
8036                 <create permission="CREATE_LOCALE" global_required="true"/>
8037                 <retrieve/>
8038                 <update permission="UPDATE_LOCALE" global_required="true"/>
8039                 <delete permission="DELETE_LOCALE" global_required="true"/>
8040             </actions>
8041         </permacrud>
8042         </class>
8043         <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">
8044                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8045                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
8046                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
8047                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
8048             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8049                 </fields>
8050                 <links>
8051                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8052                 </links>
8053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8054             <actions>
8055                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8056                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8057                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8058                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8059             </actions>
8060         </permacrud>
8061         </class>
8062
8063         <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">
8064                 <fields oils_persist:primary="id">
8065                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8066                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8067                 </fields>
8068                 <links/>
8069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8070             <actions>
8071                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8072                 <retrieve/>
8073                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8074                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8075             </actions>
8076         </permacrud>
8077         </class>
8078
8079         <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">
8080                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8081                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8082                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8083                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8084                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8085                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8086                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8087                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8088                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8089                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8090                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8091                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8092                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8093                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8094                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8095                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8096                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8097                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8098                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8099                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8100                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8101                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8102                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8103                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8104                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8105                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8106                 </fields>
8107                 <links>
8108                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8109                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8110                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8111                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8112                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8113                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8114                 </links>
8115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8116             <actions>
8117                 <create permission="user_request.create">
8118                     <context link="usr" field="home_ou"/>
8119                                 </create>
8120                 <retrieve permission="user_request.view">
8121                     <context link="usr" field="home_ou"/>
8122                                 </retrieve>
8123                 <update permission="user_request.update">
8124                     <context link="usr" field="home_ou"/>
8125                                 </update>
8126                 <delete permission="user_request.delete">
8127                     <context link="usr" field="home_ou"/>
8128                                 </delete>
8129             </actions>
8130         </permacrud>
8131         </class>
8132
8133         <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">
8134                 <fields oils_persist:primary="code">
8135                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8136                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8137                 </fields>
8138                 <links/>
8139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8140             <actions>
8141                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8142                 <retrieve/>
8143                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8144                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8145             </actions>
8146         </permacrud>
8147         </class>
8148
8149         <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">
8150                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8151                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8152                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8153                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8154                         <field reporter:label="Ratio" name="ratio" />
8155                 </fields>
8156                 <links>
8157                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8158                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8159                 </links>
8160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8161                         <actions>
8162                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8163                                 <retrieve/>
8164                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8165                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8166                         </actions>
8167                 </permacrud>
8168         </class>
8169
8170         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8171                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8172                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8173                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8174                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8175                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8176                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8177                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8178                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8179                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8180                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8181                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8182                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8183                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8184                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8185                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8186                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8187                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8188                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8189                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8190                 </fields>
8191                 <links>
8192                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8193                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8194             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8195             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8196                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8197                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8198                 </links>
8199         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8200             <actions>
8201                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8202                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8203                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8204                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8205             </actions>
8206         </permacrud>
8207         </class>
8208
8209         <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">
8210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8211                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8212                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8213                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8214                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8215                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8216                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8217                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8218                 </fields>
8219                 <links>
8220                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8221                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8222                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8223                 </links>
8224         </class>
8225
8226         <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">
8227                 <fields oils_persist:primary="code">
8228                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8229                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8230                 </fields>
8231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8232             <actions>
8233                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8234                 <retrieve/>
8235                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8236                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8237             </actions>
8238                 </permacrud>
8239         </class>
8240
8241         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8242                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8243                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8244                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8245                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8246                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8247                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8248                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8249                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8250                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8251                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8252                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8253                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8254                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
8255                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8256                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8257                 </fields>
8258                 <links>
8259                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8260                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8261                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8262                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8263                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8264                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8265                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8266                 </links>
8267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8268             <actions>
8269                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8270                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8271                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8272                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8273             </actions>
8274         </permacrud>
8275         </class>
8276
8277         <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">
8278                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8279                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8280                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8281                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8282                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8283                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8284                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8285                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8286                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8287                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8288                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8289                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8290                 </fields>
8291                 <links>
8292                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8293                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8294                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8295                 </links>
8296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8297             <actions>
8298                 <create   permission="ADMIN_INVOICE">
8299                                         <context link="invoice" field="receiver"/>
8300                                 </create>
8301                 <retrieve permission="ADMIN_INVOICE">
8302                                         <context link="invoice" field="receiver"/>
8303                                 </retrieve>
8304                 <update   permission="ADMIN_INVOICE">
8305                                         <context link="invoice" field="receiver"/>
8306                                 </update>
8307                                 <delete   permission="ADMIN_INVOICE">
8308                                         <context link="invoice" field="receiver"/>
8309                                 </delete>
8310             </actions>
8311         </permacrud>
8312         </class>
8313
8314         <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">
8315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8316                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8317                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8318                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8319                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8320                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8321                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8322                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8323                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8324                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8325                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8326                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8327                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8328                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8329                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8330                 </fields>
8331                 <links>
8332                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8333                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8334                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8335                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8336                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8337                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8338                 </links>
8339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8340             <actions>
8341                 <create   permission="ADMIN_INVOICE">
8342                                         <context link="invoice" field="receiver"/>
8343                                 </create>
8344                 <retrieve permission="ADMIN_INVOICE">
8345                                         <context link="invoice" field="receiver"/>
8346                                 </retrieve>
8347                 <update   permission="ADMIN_INVOICE">
8348                                         <context link="invoice" field="receiver"/>
8349                                 </update>
8350                                 <delete   permission="ADMIN_INVOICE">
8351                                         <context link="invoice" field="receiver"/>
8352                                 </delete>
8353             </actions>
8354         </permacrud>
8355         </class>
8356
8357         <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">
8358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8359                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8360                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8361                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8362                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8363                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8364                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8365                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8366                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8367                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8368                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8369                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8370                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8371                 </fields>
8372                 <links>
8373                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8374                 </links>
8375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8376             <actions>
8377                 <create permission="ADMIN_PROVIDER">
8378                     <context link="provider" field="owner"/>
8379                 </create>
8380                 <retrieve permission="ADMIN_PROVIDER">
8381                     <context link="provider" field="owner"/>
8382                 </retrieve>
8383                 <update permission="ADMIN_PROVIDER">
8384                     <context link="provider" field="owner"/>
8385                 </update>
8386                 <delete permission="ADMIN_PROVIDER">
8387                     <context link="provider" field="owner"/>
8388                 </delete>
8389             </actions>
8390         </permacrud>
8391         </class>
8392
8393         <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">
8394                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8395                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8396                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8397                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8398                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8399                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8400                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8401         </fields>
8402                 <links>
8403                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8404                 </links>
8405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8406             <actions>
8407                 <create permission="ADMIN_PROVIDER">
8408                     <context link="provider" field="owner"/>
8409                 </create>
8410                 <retrieve permission="ADMIN_PROVIDER">
8411                     <context link="provider" field="owner"/>
8412                 </retrieve>
8413                 <update permission="ADMIN_PROVIDER">
8414                     <context link="provider" field="owner"/>
8415                 </update>
8416                 <delete permission="ADMIN_PROVIDER">
8417                     <context link="provider" field="owner"/>
8418                 </delete>
8419             </actions>
8420         </permacrud>
8421     </class>
8422         <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">
8423                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8424                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8425                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8426                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8427                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8428                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8429                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8430                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8431                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8432                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8433                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8434                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8435                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8436                 </fields>
8437                 <links>
8438                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8439                 </links>
8440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8441             <actions>
8442                 <create permission="ADMIN_PROVIDER">
8443                     <context link="contact" jump='provider' field="owner"/>
8444                 </create>
8445                 <retrieve permission="ADMIN_PROVIDER">
8446                     <context link="contact" jump='provider' field="owner"/>
8447                 </retrieve>
8448                 <update permission="ADMIN_PROVIDER">
8449                     <context link="contact" jump='provider' field="owner"/>
8450                 </update>
8451                 <delete permission="ADMIN_PROVIDER">
8452                     <context link="contact" jump='provider' field="owner"/>
8453                 </delete>
8454             </actions>
8455         </permacrud>
8456         </class>
8457
8458         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8459                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8460                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8461                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8462                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8463                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8464                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8465                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8466                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8467                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8468                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8469                 </fields>
8470                 <links>
8471                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8472                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8473                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8474                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8475                 </links>
8476         </class>
8477
8478         <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">
8479                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8480                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8481                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8482                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8483                 </fields>
8484                 <links>
8485             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8486                 </links>
8487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8488                         <actions>
8489                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8490                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8491                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8492                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8493                         </actions>
8494                 </permacrud>
8495         </class>
8496
8497         <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">
8498                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8499                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8500                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8501                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8502                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8503                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8504                 </fields>
8505                 <links>
8506                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8507                 </links>
8508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8509                         <actions>
8510                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8511                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8512                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8513                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8514                         </actions>
8515                 </permacrud>
8516         </class>
8517
8518         <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">
8519                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8520                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8521                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8522                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8523                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8524                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8525                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8526                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8527                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8528                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8529                 </fields>
8530                 <links>
8531                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8532                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8533             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8534             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8535                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8536                 </links>
8537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8538             <actions>
8539                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8540                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8541                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8542                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8543             </actions>
8544         </permacrud>
8545         </class>
8546
8547         <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">
8548                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8549                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8550                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8551                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8552                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8553                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8554                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8555                 </fields>
8556                 <links>
8557                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8558                 </links>
8559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8560                         <actions>
8561                                 <create permission="ADMIN_FUNDING_SOURCE">
8562                     <context link="funding_source" field="owner"/>
8563                 </create>
8564                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8565                     <context link="funding_source" field="owner"/>
8566                 </retrieve>
8567                                 <update permission="ADMIN_FUNDING_SOURCE">
8568                     <context link="funding_source" field="owner"/>
8569                 </update>
8570                                 <delete permission="ADMIN_FUNDING_SOURCE">
8571                     <context link="funding_source" field="owner"/>
8572                 </delete>
8573                         </actions>
8574                 </permacrud>
8575         </class>
8576
8577         <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">
8578                 <fields oils_persist:primary="id">
8579                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8580                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8581                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8582                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8583                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8584                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8585                 </fields>
8586                 <links>
8587                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8588                 </links>
8589         </class>
8590
8591         <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">
8592                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8593                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8594                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8595                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8596                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8597                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8598                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8599                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8600                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8601                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8602                 </fields>
8603                 <links>
8604                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8605                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8606                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8607                 </links>
8608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8609                         <actions>
8610                                 <create permission="ADMIN_ACQ_FUND">
8611                     <context link="fund" field="org"/>
8612                 </create>
8613                                 <retrieve permission="ADMIN_ACQ_FUND">
8614                     <context link="fund" field="org"/>
8615                 </retrieve>
8616                                 <update permission="ADMIN_ACQ_FUND">
8617                     <context link="fund" field="org"/>
8618                 </update>
8619                                 <delete permission="ADMIN_ACQ_FUND">
8620                     <context link="fund" field="org"/>
8621                 </delete>
8622                         </actions>
8623                 </permacrud>
8624         </class>
8625
8626         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8627                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8628                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8629                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8630                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8631                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8632                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8633                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8634                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8635                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8636                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8637                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8638                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8639                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8640                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8641                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8642                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8643                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8644                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8645                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8646                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8647                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8648                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8649                 </fields>
8650                 <links>
8651                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8652                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8653             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8654             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8655             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8656             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8657             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8658             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8659             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8660             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8661             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8662                 </links>
8663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8664             <actions>
8665                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8666                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8667                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8668                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8669             </actions>
8670         </permacrud>
8671         </class>
8672
8673         <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">
8674                 <fields oils_persist:primary="fund">
8675                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8676                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8677                 </fields>
8678                 <links>
8679                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8680                 </links>
8681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8682             <actions>
8683                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8684                                         <context link="fund" field="org" />
8685                 </retrieve>
8686             </actions>
8687         </permacrud>
8688         </class>
8689
8690         <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">
8691                 <fields oils_persist:primary="fund">
8692                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8693                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8694                 </fields>
8695                 <links>
8696                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8697                 </links>
8698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8699             <actions>
8700                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8701                                         <context link="fund" field="org" />
8702                 </retrieve>
8703             </actions>
8704         </permacrud>
8705         </class>
8706
8707         <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">
8708                 <fields oils_persist:primary="fund">
8709                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8710                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8711                 </fields>
8712                 <links>
8713                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8714                 </links>
8715         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8716             <actions>
8717                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8718                                         <context link="fund" field="org" />
8719                 </retrieve>
8720             </actions>
8721         </permacrud>
8722         </class>
8723
8724         <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">
8725                 <fields oils_persist:primary="fund">
8726                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8727                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8728                 </fields>
8729                 <links>
8730                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8731                 </links>
8732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8733             <actions>
8734                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8735                                         <context link="fund" field="org" />
8736                 </retrieve>
8737             </actions>
8738         </permacrud>
8739         </class>
8740
8741         <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">
8742                 <fields oils_persist:primary="fund">
8743                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8744                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8745                 </fields>
8746                 <links>
8747                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8748                 </links>
8749         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8750             <actions>
8751                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8752                                         <context link="fund" field="org" />
8753                 </retrieve>
8754             </actions>
8755         </permacrud>
8756         </class>
8757
8758    <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">
8759         <fields oils_persist:primary="fund">
8760             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8761             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8762         </fields>
8763         <links>
8764             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8765         </links>
8766     </class>
8767
8768    <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">
8769         <fields oils_persist:primary="fund">
8770             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8771             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8772         </fields>
8773         <links>
8774             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8775         </links>
8776     </class>
8777
8778    <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">
8779         <fields oils_persist:primary="fund">
8780             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8781             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8782         </fields>
8783         <links>
8784             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8785         </links>
8786     </class>
8787
8788    <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">
8789         <fields oils_persist:primary="fund">
8790             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8791             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8792         </fields>
8793         <links>
8794             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8795         </links>
8796     </class>
8797
8798    <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">
8799         <fields oils_persist:primary="fund">
8800             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8801             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8802         </fields>
8803         <links>
8804             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8805         </links>
8806     </class>
8807
8808         <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">
8809                 <fields oils_persist:primary="funding_source">
8810                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8811                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8812                 </fields>
8813                 <links>
8814                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8815                 </links>
8816         </class>
8817
8818         <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">
8819                 <fields oils_persist:primary="funding_source">
8820                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8821                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8822                 </fields>
8823                 <links>
8824                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8825                 </links>
8826         </class>
8827
8828         <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">
8829                 <fields oils_persist:primary="funding_source">
8830                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8831                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8832                 </fields>
8833                 <links>
8834                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8835                 </links>
8836         </class>
8837
8838         <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">
8839                 <fields oils_persist:primary="fund">
8840                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8841                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8842                 </fields>
8843                 <links>
8844                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8845                 </links>
8846         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8847             <actions>
8848                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8849                                         <context link="fund" field="org" />
8850                 </retrieve>
8851             </actions>
8852         </permacrud>
8853     </class>
8854     <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">
8855         <oils_persist:source_definition><![CDATA[
8856             SELECT
8857                 acqf.*,
8858                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8859                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8860                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8861                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8862             FROM
8863                 acq.fund acqf
8864                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8865                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8866                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8867                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8868         ]]></oils_persist:source_definition>
8869         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8870             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8871             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8872             <field reporter:label="Name" name="name" reporter:datatype="text" />
8873             <field reporter:label="Year" name="year" reporter:datatype="int" />
8874             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8875             <field reporter:label="Code" name="code" reporter:datatype="text" />
8876             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8877             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8878             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8879             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8880             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8881
8882             <!-- non fund-native fields -->
8883             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8884             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8885             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8886             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8887         </fields>
8888         <links>
8889             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8890             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8891             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8892         </links>
8893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8894             <actions>
8895                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8896             </actions>
8897         </permacrud>
8898         </class>
8899         <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">
8900                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8901                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8902                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8903                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8904                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8905                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8906                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8907                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8908                 </fields>
8909                 <links>
8910                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8911                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8912                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8913                 </links>
8914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8915                         <actions>
8916                                 <create permission="ADMIN_ACQ_FUND">
8917                     <context link="fund" field="org"/>
8918                 </create>
8919                                 <retrieve permission="ADMIN_ACQ_FUND">
8920                     <context link="fund" field="org"/>
8921                 </retrieve>
8922                                 <update permission="ADMIN_ACQ_FUND">
8923                     <context link="fund" field="org"/>
8924                 </update>
8925                                 <delete permission="ADMIN_ACQ_FUND">
8926                     <context link="fund" field="org"/>
8927                 </delete>
8928                         </actions>
8929                 </permacrud>
8930         </class>
8931
8932     <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">
8933         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8934             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8935             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8936             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8937             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8938             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8939             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8940             <field reporter:label="Note" name="note" reporter:datatype="text" />
8941             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8942         </fields>
8943         <links>
8944             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8945             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8946             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8947         </links>
8948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8949                         <actions>
8950                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8951                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8952                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8953                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8954                         </actions>
8955                 </permacrud>
8956     </class>
8957
8958         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8959                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8960                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8961                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8962                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8963                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8964                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8965                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8966                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8967                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8968                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8969                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8970                 </fields>
8971                 <links>
8972                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8973                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8974                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8975                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8976                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8977                 </links>
8978                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8979                         <actions>
8980                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8981                         </actions>
8982                 </permacrud>
8983         </class>
8984
8985         <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">
8986                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8987                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8988                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8989                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8990                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8991                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8992                 </fields>
8993                 <links>
8994                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8995                 </links>
8996                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8997                         <actions>
8998                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8999                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9000                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9001                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9002                         </actions>
9003                 </permacrud>
9004         </class>
9005
9006         <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">
9007                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9008                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9009                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9010                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9011                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9012                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9013                         <field reporter:label="State" name="state" reporter:datatype="text" />
9014                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9015                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9016                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9017                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9018                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9019                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9020                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9021                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9022                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9023                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9024                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9025                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9026                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9027                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9028                 </fields>
9029                 <links>
9030                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9031                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9032                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9033                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9034                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9035                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9036                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9037                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9038                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9039                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9040                 </links>
9041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9042                         <actions>
9043                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9044                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9045                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9046                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9047                         </actions>
9048                 </permacrud>
9049         </class>
9050
9051         <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">
9052                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9053                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9054                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9055                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9056                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9057                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9058                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9059                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9060                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9061                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9062                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9063                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9064                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9065                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9066                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9067                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9068                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9069                 </fields>
9070                 <links>
9071                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9072                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9073                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9074                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9075                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9076                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9077                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9078                 </links>
9079                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9080             <actions>
9081                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9082             </actions>
9083                 </permacrud>
9084         </class>
9085
9086         <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">
9087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9088                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9089                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9090                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9091                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9092                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9093                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9094                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9095                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9096                 </fields>
9097                 <links>
9098                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9099                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9100                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9101                 </links>
9102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9103             <actions>
9104                 <create permission="CREATE_PURCHASE_ORDER">
9105                     <context link="purchase_order" field="ordering_agency"/>
9106                 </create>
9107                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9108                     <context link="purchase_order" field="ordering_agency"/>
9109                 </retrieve>
9110                 <update permission="CREATE_PURCHASE_ORDER">
9111                     <context link="purchase_order" field="ordering_agency"/>
9112                 </update>
9113                 <delete permission="CREATE_PURCHASE_ORDER">
9114                     <context link="purchase_order" field="ordering_agency"/>
9115                 </delete>
9116             </actions>
9117                 </permacrud>
9118         </class>
9119
9120         <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">
9121                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9122                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9123                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9124                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9125                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9126                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9127                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9128                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9129                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9130                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9131                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9132                 </fields>
9133                 <links>
9134                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9135                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9136                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9137                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9138                 </links>
9139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9140             <actions>
9141                 <create permission="CREATE_PURCHASE_ORDER">
9142                     <context link="purchase_order" field="ordering_agency"/>
9143                 </create>
9144                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9145                     <context link="purchase_order" field="ordering_agency"/>
9146                 </retrieve>
9147                 <update permission="CREATE_PURCHASE_ORDER">
9148                     <context link="purchase_order" field="ordering_agency"/>
9149                 </update>
9150                 <delete permission="CREATE_PURCHASE_ORDER">
9151                     <context link="purchase_order" field="ordering_agency"/>
9152                 </delete>
9153             </actions>
9154                 </permacrud>
9155         </class>
9156
9157         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9158                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9159                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9160                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9161                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9162                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9163                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9164                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9165                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9166                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9167                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9168                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9169                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9170                         <field reporter:label="State" name="state" reporter:datatype="text" />
9171                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9172                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9173                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9174                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9175                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9176                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9177                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9178                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9179                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9180                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9181                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9182                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9183                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9184                 </fields>
9185                 <links>
9186                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9187                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9188                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9189                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9190                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9191                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9192                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9193                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9194                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9195                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9196                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9197                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9198                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9199                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9200                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9201                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9202                 </links>
9203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9204                         <actions>
9205                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9206                                         <context link="purchase_order" field="ordering_agency"/>
9207                                         <context link="picklist" field="org_unit"/>
9208                                 </retrieve>
9209                         </actions>
9210                 </permacrud>
9211         </class>
9212
9213         <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">
9214                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9215                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9216                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9217                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9218                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9219                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9220                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9221                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9222                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9223                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9224                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9225                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9226                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9227                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9228                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9229                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9230                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9231                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9232                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9233                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9234                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9235                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9236                 </fields>
9237                 <links>
9238                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9239                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9240                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9241                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9242                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9243                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9244                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9245                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9246                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9247                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9248                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9249                 </links>
9250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9251                         <actions>
9252                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9253                                         <context link="purchase_order" field="ordering_agency"/>
9254                                         <context link="picklist" field="org_unit"/>
9255                                 </retrieve>
9256                         </actions>
9257                 </permacrud>
9258         </class>
9259
9260         <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">
9261                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9262                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9263                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9264                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9265                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9266                 </fields>
9267                 <links>
9268                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9269                 </links>
9270                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9271                         <actions>
9272                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9273                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9274                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9275                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9276                         </actions>
9277                 </permacrud>
9278         </class>
9279
9280         <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">
9281                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9282                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9283                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9284                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9285                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9286                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9287                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9288                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9289                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9290                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9291                 </fields>
9292                 <links>
9293                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9294                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9295                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9296                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9297                 </links>
9298         </class>
9299
9300         <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">
9301                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9302                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9303                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9304                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9305                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9306                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9307                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9308                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9309                 </fields>
9310                 <links>
9311                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9312                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9313                 </links>
9314         </class>
9315
9316         <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">
9317                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9318                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9319                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9320                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9321                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9322                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9323                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9324                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9325                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9326                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9327                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9328                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9329                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9330                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9331                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9332                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9333                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9334                 </fields>
9335                 <links>
9336                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9337                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9338                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9339                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9340                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9341                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9342                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9343                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9344                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9345                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9346                 </links>
9347         </class>
9348
9349         <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">
9350                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9351                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9352                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9353                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9354                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9355                 </fields>
9356                 <links/>
9357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9358                         <actions>
9359                                 <retrieve />
9360                         </actions>
9361                 </permacrud>
9362         </class>
9363
9364         <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">
9365                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9366                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9367                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9368                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9369                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9370                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9371             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9372                 </fields>
9373                 <links/>
9374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9375             <actions>
9376                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9377                 <retrieve />
9378                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9379                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9380             </actions>
9381         </permacrud>
9382         </class>
9383
9384         <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">
9385                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9386                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9387                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9388                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9389                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9390                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9391                 </fields>
9392                 <links/>
9393         </class>
9394         <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">
9395                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9396                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9397                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9398                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9399                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9400                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9401                 </fields>
9402                 <links>
9403                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9404                 </links>
9405         </class>
9406
9407         <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">
9408             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9409                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9410                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9411                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9412                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9413                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9414                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9415         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9416
9417             </fields>
9418             <links>
9419                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9420             </links>
9421             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9422                 <actions>
9423                     <create permission="ADMIN_PROVIDER">
9424                         <context link="provider" field="owner"/>
9425                     </create>
9426                     <retrieve permission="ADMIN_PROVIDER">
9427                         <context link="provider" field="owner"/>
9428                     </retrieve>
9429                     <update permission="ADMIN_PROVIDER">
9430                         <context link="provider" field="owner"/>
9431                     </update>
9432                     <delete permission="ADMIN_PROVIDER">
9433                         <context link="provider" field="owner"/>
9434                     </delete>
9435                 </actions>
9436             </permacrud>
9437         </class>
9438         
9439         <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">
9440             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9441                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9442                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9443                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9444                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9445             </fields>
9446             <links>
9447                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9448             </links>
9449             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9450                 <actions>
9451                     <create permission="ADMIN_PROVIDER">
9452                         <context link="provider" field="owner"/>
9453                     </create>
9454                     <retrieve permission="ADMIN_PROVIDER">
9455                         <context link="provider" field="owner"/>
9456                     </retrieve>
9457                     <update permission="ADMIN_PROVIDER">
9458                         <context link="provider" field="owner"/>
9459                     </update>
9460                     <delete permission="ADMIN_PROVIDER">
9461                         <context link="provider" field="owner"/>
9462                     </delete>
9463                 </actions>
9464             </permacrud>
9465         </class>
9466         
9467         <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">
9468             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9469                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9470                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9471                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9472                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9473                 </fields>
9474                 <links/>
9475         </class>
9476
9477         <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">
9478                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9479                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9480                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9481                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9482                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9483                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9484                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9485                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9486                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9487                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9488                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9489                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9490                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9491                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9492                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9493                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9494                 </fields>
9495                 <links>
9496                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9497                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9498                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9499                 </links>
9500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9501             <actions>
9502                 <create permission="ADMIN_PROVIDER">
9503                     <context link="provider" field="owner"/>
9504                 </create>
9505                 <retrieve permission="ADMIN_PROVIDER">
9506                     <context link="provider" field="owner"/>
9507                 </retrieve>
9508                 <update permission="ADMIN_PROVIDER">
9509                     <context link="provider" field="owner"/>
9510                 </update>
9511                 <delete permission="ADMIN_PROVIDER">
9512                     <context link="provider" field="owner"/>
9513                 </delete>
9514             </actions>
9515         </permacrud>
9516         </class>
9517
9518         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9519                 oils_obj:fieldmapper="acq::edi_attr" 
9520                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9521                 <fields oils_persist:primary="key">
9522                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9523                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9524                 </fields>
9525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9526             <actions>
9527                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9528                 <retrieve/>
9529                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9530                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9531             </actions>
9532         </permacrud>
9533         </class>
9534         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9535                 oils_obj:fieldmapper="acq::edi_attr_set" 
9536                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9537                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9538                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9539                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9540                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9541                 </fields>
9542                 <links>
9543                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9544                 </links>
9545         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9546             <actions>
9547                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9548                 <retrieve/>
9549                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9550                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9551             </actions>
9552         </permacrud>
9553         </class>
9554         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9555                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9556                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9558                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9559                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9560                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9561                 </fields>
9562                 <links>
9563                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9564                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9565                 </links>
9566         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9567             <actions>
9568                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9569                 <retrieve/>
9570                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9571                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9572             </actions>
9573         </permacrud>
9574         </class>
9575
9576
9577         <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">
9578                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9579                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9580                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9581                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9582                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9583                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9584                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9585                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9586                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9587                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9588                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9589                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9590                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9591                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9592                 </fields>
9593                 <links>
9594                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9595                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9596                 </links>
9597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9598             <actions>
9599                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9600                     <context link="account" jump="provider" field="owner"/>
9601                 </retrieve>
9602                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9603                     <context link="account" jump="provider" field="owner"/>
9604                 </update>
9605                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9606                     <context link="account" jump="provider" field="owner"/>
9607                 </delete>
9608             </actions>
9609         </permacrud>
9610         </class>
9611
9612
9613         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9614                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9615                         <field name="id" reporter:datatype="id" />
9616                         <field name="parent" reporter:datatype="link"/>
9617                         <field name="owner" reporter:datatype="link"/>
9618                         <field name="create_time" reporter:datatype="timestamp"/>
9619                         <field name="name" reporter:datatype="text"/>
9620                         <field name="shared" reporter:datatype="bool"/>
9621                         <field name="share_with" reporter:datatype="link"/>
9622                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9623                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9624                 </fields>
9625                 <links>
9626                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9627                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9628                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9629                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9630                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9631                 </links>
9632         </class>
9633         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9634                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9635                         <field name="id" reporter:datatype="id" />
9636                         <field name="parent" reporter:datatype="link"/>
9637                         <field name="owner" reporter:datatype="link"/>
9638                         <field name="create_time" reporter:datatype="timestamp"/>
9639                         <field name="name" reporter:datatype="text"/>
9640                         <field name="shared" reporter:datatype="bool"/>
9641                         <field name="share_with" reporter:datatype="link"/>
9642                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9643                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9644                 </fields>
9645                 <links>
9646                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9647                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9648                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9649                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9650                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9651                 </links>
9652         </class>
9653         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9654                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9655                         <field name="id" reporter:datatype="id" />
9656                         <field name="parent" reporter:datatype="link"/>
9657                         <field name="owner" reporter:datatype="link"/>
9658                         <field name="create_time" reporter:datatype="timestamp"/>
9659                         <field name="name" reporter:datatype="text"/>
9660                         <field name="shared" reporter:datatype="bool"/>
9661                         <field name="share_with" reporter:datatype="link"/>
9662                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9663                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9664                 </fields>
9665                 <links>
9666                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9667                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9668                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9669                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9670                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9671                 </links>
9672         </class>
9673         <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">
9674                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9675                         <field name="id" reporter:datatype="id" />
9676                         <field name="owner" reporter:datatype="link"/>
9677                         <field name="create_time" reporter:datatype="timestamp"/>
9678                         <field name="name" reporter:datatype="text"/>
9679                         <field name="data" reporter:datatype="text"/>
9680                         <field name="folder" reporter:datatype="link"/>
9681                         <field name="description" reporter:datatype="text"/>
9682                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9683                 </fields>
9684                 <links>
9685                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9686                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9687                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9688                 </links>
9689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9690             <actions>
9691                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9692                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9693                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9694                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9695             </actions>
9696         </permacrud>
9697         </class>
9698         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9699                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9700                         <field name="id" reporter:datatype="id" />
9701                         <field name="owner" reporter:datatype="link"/>
9702                         <field name="create_time" reporter:datatype="timestamp"/>
9703                         <field name="template" reporter:datatype="link"/>
9704                         <field name="data" reporter:datatype="text"/>
9705                         <field name="folder" reporter:datatype="link"/>
9706                         <field name="recur" reporter:datatype="bool"/>
9707                         <field name="recurrence" reporter:datatype="interval"/>
9708                         <field name="name" reporter:datatype="text"/>
9709                         <field name="description" reporter:datatype="text"/>
9710                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9711                 </fields>
9712                 <links>
9713                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9714                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9715                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9716                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9717                 </links>
9718         </class>
9719         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9720                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9721                         <field name="id" reporter:datatype="id" />
9722                         <field name="runner" reporter:datatype="link"/>
9723                         <field name="start_time" reporter:datatype="timestamp"/>
9724                         <field name="complete_time" reporter:datatype="timestamp"/>
9725                         <field name="run_time" reporter:datatype="timestamp"/>
9726                         <field name="email" reporter:datatype="text"/>
9727                         <field name="excel_format" reporter:datatype="bool"/>
9728                         <field name="csv_format" reporter:datatype="bool"/>
9729                         <field name="html_format" reporter:datatype="bool"/>
9730                         <field name="error_code" reporter:datatype="int"/>
9731                         <field name="error_text" reporter:datatype="text"/>
9732                         <field name="report" reporter:datatype="link"/>
9733                         <field name="folder" reporter:datatype="link"/>
9734                         <field name="chart_pie" reporter:datatype="bool"/>
9735                         <field name="chart_bar" reporter:datatype="bool"/>
9736                         <field name="chart_line" reporter:datatype="bool"/>
9737                 </fields>
9738                 <links>
9739                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9740                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9741                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9742                 </links>
9743         </class>
9744         <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">
9745                 <fields oils_persist:primary="id">
9746                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9747                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9748                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9749                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9750                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9751                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9752                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9753                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9754                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9755                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9756                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9757                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9758                 </fields>
9759                 <links>
9760                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9761                 </links>
9762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9763                         <actions>
9764                                 <retrieve />
9765                         </actions>
9766                 </permacrud>
9767         </class>
9768         <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">
9769                 <fields oils_persist:primary="id">
9770                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9771                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9772                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9773                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9774                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9775                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9776                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9777                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9778                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9779                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9780                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9781                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9782                 </fields>
9783                 <links>
9784                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9785                 </links>
9786         </class>
9787         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9788                 <fields oils_persist:primary="id">
9789                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9790                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9791                         <field reporter:label="Fingerprint" name="fingerprint" />
9792                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9793                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9794                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9795                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9796                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9797                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9798                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9799                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9800                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9801                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9802                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9803                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9804                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9805                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9806                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9807                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9808                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9809                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9810                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9811                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9812                 </fields>
9813                 <links>
9814                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9815                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9816                 </links>
9817         </class>
9818         <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">
9819                 <fields oils_persist:primary="id">
9820                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9821                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9822                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9823                 </fields>
9824                 <links>
9825                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9826                 </links>
9827         </class>
9828         <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">
9829                 <fields oils_persist:primary="id">
9830                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9831                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9832                 </fields>
9833                 <links>
9834                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9835                 </links>
9836         </class>
9837         <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">
9838                 <fields oils_persist:primary="id">
9839                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9840                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9841                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9842                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9843                 </fields>
9844                 <links>
9845                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9846                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9847                 </links>
9848         </class>
9849         <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">
9850                 <fields oils_persist:primary="xact">
9851                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9852                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9853                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9854                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9855                 </fields>
9856                 <links>
9857                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9858                 </links>
9859         </class>
9860         <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">
9861                 <fields oils_persist:primary="xact">
9862                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9863                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9864                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9865                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9866                 </fields>
9867                 <links>
9868                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9869                 </links>
9870         </class>
9871         <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)">
9872                 <fields oils_persist:primary="id">
9873                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9874                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9875                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9876                 </fields>
9877                 <links>
9878                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9879                 </links>
9880         </class>
9881         <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">
9882                 <fields oils_persist:primary="id">
9883                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9884                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9885                 </fields>
9886                 <links>
9887                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9888                 </links>
9889         </class>
9890         <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">
9891                 <fields oils_persist:primary="bibid">
9892                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
9893                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
9894                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
9895                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
9896                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
9897                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
9898                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
9899                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
9900                 </fields>
9901                 <links>
9902                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
9903                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9904                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9905                 </links>
9906         </class>
9907         <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">
9908                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9909                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9910                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9911                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9912                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9913                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9914                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9915                 </fields>
9916                 <links>
9917                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9918                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9919                 </links>
9920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9921                         <actions>
9922                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9923                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9924                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9925                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9926                         </actions>
9927                 </permacrud>
9928         </class>
9929         <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">
9930                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9931                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9932                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9933                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9934                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9935                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9936                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9937                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9938                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9939                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9940                 </fields>
9941                 <links>
9942                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9943                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9944                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9945                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9946                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9947                 </links>
9948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9949                         <actions>
9950                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9951                                         <context link="formula" field="owner"/>
9952                                 </create>
9953                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9954                                         <context link="formula" field="owner"/>
9955                                 </retrieve>
9956                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9957                                         <context link="formula" field="owner"/>
9958                                 </update>
9959                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9960                                         <context link="formula" field="owner"/>
9961                                 </delete>
9962                         </actions>
9963                 </permacrud>
9964         </class>
9965
9966         <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">
9967                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9968                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9969                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9970                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9971                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9972                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9973                 </fields>
9974                 <links>
9975                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9976                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9977                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9978                 </links>
9979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9980                         <actions>
9981                                 <create permission="CREATE_PURCHASE_ORDER">
9982                                         <context link="formula" field="owner"/>
9983                 </create>
9984                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9985                                         <context link="formula" field="owner"/>
9986                 </retrieve>
9987                                 <update permission="CREATE_PURCHASE_ORDER">
9988                                         <context link="formula" field="owner"/>
9989                 </update>
9990                                 <delete permission="CREATE_PURCHASE_ORDER">
9991                                         <context link="formula" field="owner"/>
9992                 </delete>
9993                         </actions>
9994                 </permacrud>
9995         </class>
9996
9997         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9998                 <fields oils_persist:primary="id">
9999                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10000                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10001                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10002                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10003                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10004                 </fields>
10005                 <links>
10006                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10007                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10008                 </links>
10009         </class>
10010
10011         <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">
10012                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10013                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10014                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10015                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10016                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10017                 </fields>
10018                 <links>
10019                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10020                 </links>
10021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10022                         <actions>
10023                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10024                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10025                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10026                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10027                         </actions>
10028                 </permacrud>
10029         </class>
10030
10031         <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">
10032                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10033                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10034                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10035                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10036                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10037                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10038                 </fields>
10039                 <links>
10040                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10041                 </links>
10042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10043                         <actions>
10044                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10045                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10046                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10047                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10048                         </actions>
10049                 </permacrud>
10050         </class>
10051
10052         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10053                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10054                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10055                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10056                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10057                 </fields>
10058                 <links>
10059                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10060                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10061                 </links>
10062         </class>
10063
10064         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10065                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10066                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10067                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10068                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10069                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10070                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10071                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10072                 </fields>
10073                 <links>
10074                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10075                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10076                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10077                 </links>
10078         </class>
10079
10080         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10081                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10082                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10083                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10084                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10085                 </fields>
10086                 <links>
10087                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10088                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10089                 </links>
10090         </class>
10091
10092         <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">
10093                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10094                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10095                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10096                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10097                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10098                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10099                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10100                 </fields>
10101                 <links>
10102                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10103                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10104                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10105                 </links>
10106         </class>
10107
10108         <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">
10109                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10110                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10111                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10112                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10113                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10114                 </fields>
10115                 <links>
10116                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10117                 </links>
10118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10119             <actions>
10120                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10121                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10122                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10123                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10124             </actions>
10125                 </permacrud>
10126         </class>
10127
10128         <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">
10129                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10130                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10131                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10132                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10133                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10134                 </fields>
10135                 <links>
10136                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10137                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10138                 </links>
10139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10140                         <actions>
10141                                 <create permission="ADMIN_CLAIM_POLICY">
10142                                         <context link="claim_policy" field="org_unit"/>
10143                 </create>
10144                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10145                                         <context link="claim_policy" field="org_unit"/>
10146                 </retrieve>
10147                                 <update permission="ADMIN_CLAIM_POLICY">
10148                                         <context link="claim_policy" field="org_unit"/>
10149                 </update>
10150                                 <delete permission="ADMIN_CLAIM_POLICY">
10151                                         <context link="claim_policy" field="org_unit"/>
10152                 </delete>
10153                         </actions>
10154                 </permacrud>
10155         </class>
10156
10157     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10158         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10159             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10160             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10161             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10162             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10163             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10164             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10165             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10166             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10167             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10168             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10169             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10170             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10171             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10172             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10173             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10174             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10175         </fields>
10176         <links>
10177             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10178         </links>
10179     </class>
10180
10181     <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">
10182         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10183             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10184             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10185             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10186             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10187             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10188         </fields>
10189     </class>
10190
10191     <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">
10192         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10193             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10194             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10195             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10196             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10197             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10198             <field reporter:label="City" name="city" reporter:datatype="text"/>
10199             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10200             <field reporter:label="State" name="state" reporter:datatype="text"/>
10201             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10202             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10203             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10204         </fields>
10205     </class>
10206
10207     <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">
10208         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10209             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10210             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10211             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10212             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10213             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10214             <field reporter:label="City" name="city" reporter:datatype="text"/>
10215             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10216             <field reporter:label="State" name="state" reporter:datatype="text"/>
10217             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10218             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10219             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10220         </fields>
10221     </class>
10222
10223     <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">
10224         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10225             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10226             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10227             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10228             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10229             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10230             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10231         </fields>
10232     </class>
10233
10234     <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">
10235         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10236             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10237             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10238             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10239             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10240             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10241             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10242         </fields>
10243     </class>
10244
10245         <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">
10246                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10247                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10248                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10249                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10250                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10251                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10252                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10253                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10254                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10255                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10256                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10257                 </fields>
10258                 <links>
10259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10260                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10261                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10262                 </links>
10263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10264                         <actions>
10265                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10266                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10267                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10268                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10269                         </actions>
10270                 </permacrud>
10271         </class>
10272
10273         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10274                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10275                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10276                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10277                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10278                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10279                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10280                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10281                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10282                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10283                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10284                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10285                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10286                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10287                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10288                 </fields>
10289                 <links>
10290                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10291                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10292                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10293                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10294                 </links>
10295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10296                         <actions>
10297                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10298                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10299                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10300                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10301                         </actions>
10302                 </permacrud>
10303         </class>
10304
10305         <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">
10306                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10307                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10308                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10309                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10310                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10311                 </fields>
10312                 <links>
10313                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10314                 </links>
10315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10316                         <actions>
10317                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10318                     <context link="fieldset" field="owning_lib"/>
10319                 </create>
10320                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10321                     <context link="fieldset" field="owning_lib"/>
10322                 </retrieve>
10323                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10324                     <context link="fieldset" field="owning_lib"/>
10325                 </update>
10326                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10327                     <context link="fieldset" field="owning_lib"/>
10328                 </delete>
10329                         </actions>
10330                 </permacrud>
10331         </class>
10332
10333     <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">
10334         <fields>
10335             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10336             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10337             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10338         </fields>
10339                 <links>
10340                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10341                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10342                 </links>
10343     </class>
10344
10345     <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">
10346         <fields>
10347             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10348             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10349         </fields>
10350                 <links>
10351                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10352                 </links>
10353     </class>
10354
10355     <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">
10356         <fields>
10357             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10358             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10359             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10360         </fields>
10361                 <links>
10362                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10363                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10364                 </links>
10365     </class>
10366
10367     <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">
10368         <fields>
10369             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10370             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10371         </fields>
10372                 <links>
10373                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10374                 </links>
10375     </class>
10376
10377     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10378                 <oils_persist:source_definition>
10379
10380             SELECT  DISTINCT l.*
10381               FROM  action.unfulfilled_hold_loops l
10382                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10383               WHERE l.count = m.max
10384
10385                 </oils_persist:source_definition>
10386         <fields>
10387             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10388             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10389             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10390         </fields>
10391                 <links>
10392                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10393                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10394                 </links>
10395     </class>
10396
10397         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10398                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10399                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10400                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10401                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10402                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10403                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10404                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10405                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10406                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10407                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10408                 </fields>
10409                 <links>
10410                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10411                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10412                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10413                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10414                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10415                 </links>
10416         </class>
10417
10418         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10419                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10420                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10421                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10422                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10423                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10424                 </fields>
10425                 <links>
10426                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10427                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10428                 </links>
10429         </class>
10430
10431         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10432                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10433                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10434                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10435                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10436                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10437                 </fields>
10438                 <links>
10439                 </links>
10440         </class>
10441
10442         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10443                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10444                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10445                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10446                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10447                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10448                 </fields>
10449                 <links>
10450                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10451                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10452                 </links>
10453         </class>
10454         
10455         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10456                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10457                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10458                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10459                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10460                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10461                 </fields>
10462                 <links>
10463                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10464                 </links>
10465         </class>
10466         
10467         <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">
10468                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10469                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10470                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10471                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10472                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10473                 </fields>
10474                 <links>
10475                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10476                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10477                 </links>
10478         </class>
10479
10480         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10481                 <fields oils_persist:primary="name">
10482                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10483                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10484                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10485                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10486                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10487                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10488                 </fields>
10489                 <links>
10490                 </links>
10491         </class>
10492
10493         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10494                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10495                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10496                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10497                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10498                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10499                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10500                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10501                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10502                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10503                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10504                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10505                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10506                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10507                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10508                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10509                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10510                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10511                 </fields>
10512                 <links>
10513                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10514                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10515                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10516                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10517                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10518                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10519                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10520                 </links>
10521         </class>
10522
10523         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10524                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10525                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10526                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10527                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10528                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10529                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10530                 </fields>
10531                 <links>
10532                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10533                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10534                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10535                 </links>
10536         </class>
10537
10538         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10539                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10540                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10541                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10542                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10543                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10544                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10545                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10546                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10547                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10548                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10549                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10550                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10551                 </fields>
10552                 <links>
10553                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10554                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10555                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10556                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10557                 </links>
10558         </class>
10559
10560         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10561                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10562                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10563                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10564                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10565                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10566                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10567                 </fields>
10568                 <links>
10569                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10570                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10571                 </links>
10572         </class>
10573
10574         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10575                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10576                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10577                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10578                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10579                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10580                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10581                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10582                 </fields>
10583                 <links>
10584                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10585                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10586                 </links>
10587         </class>
10588
10589         <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">
10590                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10591                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10592                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10593                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10594                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10595                 </fields>
10596                 <links>
10597                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10598                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10599                 </links>
10600         </class>
10601
10602         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10603                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10604                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10605                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10606                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10607                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10608                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10609                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10610                 </fields>
10611                 <links>
10612                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10613                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10614                 </links>
10615         </class>
10616
10617         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10618                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10619                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10620                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10621                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10622                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10623                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10624                 </fields>
10625                 <links>
10626                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10627                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10628                 </links>
10629         </class>
10630
10631         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10632                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10633                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10634                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10635                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10636                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10637                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10638                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10639                 </fields>
10640                 <links>
10641                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10642                 </links>
10643         </class>
10644
10645         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10646                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10647                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10648                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10649                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10650                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10651                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10652                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10653                 </fields>
10654                 <links>
10655                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10656                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10657                 </links>
10658         </class>
10659
10660         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10661                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10662                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10663                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10664                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10665                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10666                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10667                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10668                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10669                 </fields>
10670                 <links>
10671                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10672                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10673                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10674                 </links>
10675         </class>
10676
10677         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10678                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10679                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10680                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10681                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10682                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10683                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10684                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10685                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10686                 </fields>
10687                 <links>
10688                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10689                 </links>
10690         </class>
10691
10692         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10693                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10694                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10695                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10696                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10697                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10698                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10699                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10700                 </fields>
10701                 <links>
10702                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10703                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10704                 </links>
10705         </class>
10706
10707         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10708                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10709                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10710                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10711                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10712                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10713                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10714                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10715                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10716                 </fields>
10717                 <links>
10718                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10719                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10720                 </links>
10721         </class>
10722
10723         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10724                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10725                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10726                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10727                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10728                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10729                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10730                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10731                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10732                 </fields>
10733                 <links>
10734                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10735                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10736                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10737                 </links>
10738         </class>
10739
10740         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10741                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10742                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10743                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10744                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10745                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10746                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10747                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10748                 </fields>
10749                 <links>
10750                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10751                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10752                 </links>
10753         </class>
10754
10755         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10756                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10757                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10758                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10759                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10760                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10761                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10762                 </fields>
10763                 <links>
10764                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10765                 </links>
10766         </class>
10767
10768         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10769                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10770                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10771                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10772                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10773                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10774                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10775                 </fields>
10776                 <links>
10777                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10778                 </links>
10779         </class>
10780
10781         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10782                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10783                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10784                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10785                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10786                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10787                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10788                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10789                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10790                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10791                 </fields>
10792                 <links>
10793                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10794                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10795                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10796                 </links>
10797         </class>
10798
10799         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10800                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10801                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10802                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10803                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10804                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10805                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10806                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10807                 </fields>
10808                 <links>
10809                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10810                 </links>
10811         </class>
10812
10813         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10814                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10815                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10816                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10817                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10818                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10819                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10820                 </fields>
10821                 <links>
10822                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10823                 </links>
10824         </class>
10825
10826         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10827                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10828                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10829                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10830                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10831                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10832                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10833                 </fields>
10834                 <links>
10835                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10836                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10837                 </links>
10838         </class>
10839
10840         <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">
10841                 <fields oils_persist:primary="id">
10842                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10843                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10844                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10845                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10846                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10847                 </fields>
10848                 <links>
10849                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10850                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10851                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10852                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10853                 </links>
10854         </class>
10855
10856         <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">
10857                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10858                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10859                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10860                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10861                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10862                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10863                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10864                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10865                 </fields>
10866                 <links/>
10867                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10868                         <actions>
10869                                 <retrieve/>
10870                         </actions>
10871                 </permacrud>
10872         </class>
10873
10874         <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">
10875                 <fields oils_persist:primary="ptype_key">
10876                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10877                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10878                 </fields>
10879                 <links/>
10880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10881                         <actions>
10882                                 <retrieve/>
10883                         </actions>
10884                 </permacrud>
10885         </class>
10886
10887         <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">
10888                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10889                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10890                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10891                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10892                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10893                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10894                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10895                 </fields>
10896                 <links>
10897                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10898                 </links>
10899                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10900                         <actions>
10901                                 <retrieve/>
10902                         </actions>
10903                 </permacrud>
10904         </class>
10905
10906         <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">
10907                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10908                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10909                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10910                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10911                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10912                 </fields>
10913                 <links>
10914                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10915                 </links>
10916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10917                         <actions>
10918                                 <retrieve/>
10919                         </actions>
10920                 </permacrud>
10921         </class>
10922
10923     <class
10924         id="uvs"
10925         controller="open-ils.cstore open-ils.pcrud"
10926         oils_obj:fieldmapper="url_verify::session"
10927         oils_persist:tablename="url_verify.session"
10928         reporter:label="URL Verification Session"
10929     >
10930         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10931             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10932             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10933                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10934             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10935             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10936             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10937             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10938             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10939             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10940         </fields>
10941
10942         <links>
10943             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10944             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10945             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10946             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10947             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10948         </links>
10949
10950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10951             <actions>
10952                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10953             </actions>
10954         </permacrud>
10955
10956     </class>
10957
10958     <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">
10959         <oils_persist:source_definition>
10960             SELECT
10961                 cbrebi.id AS id,  -- so we can have a pkey in our view
10962                 uvs.id AS session,
10963                 uvs.owning_lib,
10964                 cbrebi.target_biblio_record_entry
10965             FROM url_verify.session uvs
10966             JOIN container.biblio_record_entry_bucket cbreb
10967                 ON (uvs.container = cbreb.id)
10968             JOIN container.biblio_record_entry_bucket_item cbrebi
10969                 ON (cbrebi.bucket = cbreb.id)
10970         </oils_persist:source_definition>
10971         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10972             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10973             <field reporter:label="Session" name="session" reporter:datatype="link" />
10974             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10975             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10976         </fields>
10977         <links>
10978             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10979             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10980             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10981         </links>
10982         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10983             <actions>
10984                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10985             </actions>
10986         </permacrud>
10987     </class>
10988
10989     <class
10990         id="uvus"
10991         controller="open-ils.cstore open-ils.pcrud"
10992         oils_obj:fieldmapper="url_verify::url_selector"
10993         oils_persist:tablename="url_verify.url_selector"
10994         reporter:label="URL Verification URL Selector"
10995     >
10996         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10997             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10998             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10999                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11000             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11001         </fields>
11002
11003         <links>
11004             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11005             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11006         </links>
11007
11008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11009             <actions>
11010                 <create permission="URL_VERIFY">
11011                     <context link="session" field="owning_lib"/>
11012                 </create>
11013                 <retrieve permission="URL_VERIFY">
11014                     <context link="session" field="owning_lib"/>
11015                 </retrieve>
11016                 <update permission="URL_VERIFY">
11017                     <context link="session" field="owning_lib"/>
11018                 </update>
11019                 <delete permission="URL_VERIFY">
11020                     <context link="session" field="owning_lib"/>
11021                 </delete>
11022             </actions>
11023         </permacrud>
11024
11025     </class>
11026
11027     <class
11028         id="uvu"
11029         controller="open-ils.cstore open-ils.pcrud"
11030         oils_obj:fieldmapper="url_verify::url"
11031         oils_persist:tablename="url_verify.url"
11032         reporter:label="URL Verification URL"
11033     >
11034         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11035             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11036                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11037                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11038                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11039                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11040             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11041             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11042             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11043             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11044             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11045             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11046             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11047             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11048             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11049             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11050             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11051             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11052             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11053         </fields>
11054
11055         <links>
11056             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11057             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11058             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11059             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11060             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11061         </links>
11062
11063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11064             <actions>
11065                 <create permission="URL_VERIFY">
11066                     <context link="session" field="owning_lib"/>
11067                 </create>
11068                 <retrieve permission="URL_VERIFY">
11069                     <context link="session" field="owning_lib"/>
11070                 </retrieve>
11071                 <update permission="URL_VERIFY">
11072                     <context link="session" field="owning_lib"/>
11073                 </update>
11074                 <delete permission="URL_VERIFY">
11075                     <context link="session" field="owning_lib"/>
11076                 </delete>
11077             </actions>
11078         </permacrud>
11079
11080     </class>
11081
11082     <class
11083         id="uvva"
11084         controller="open-ils.cstore open-ils.pcrud"
11085         oils_obj:fieldmapper="url_verify::verification_attempt"
11086         oils_persist:tablename="url_verify.verification_attempt"
11087         reporter:label="URL Verification Attempt"
11088     >
11089         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11090             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11091                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11092                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11093             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11094             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11095         </fields>
11096
11097         <links>
11098             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11099             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11100         </links>
11101
11102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11103             <actions>
11104                 <create permission="URL_VERIFY">
11105                     <context link="session" field="owning_lib"/>
11106                 </create>
11107                 <retrieve permission="URL_VERIFY">
11108                     <context link="session" field="owning_lib"/>
11109                 </retrieve>
11110                 <update permission="URL_VERIFY">
11111                     <context link="session" field="owning_lib"/>
11112                 </update>
11113                 <delete permission="URL_VERIFY">
11114                     <context link="session" field="owning_lib"/>
11115                 </delete>
11116             </actions>
11117         </permacrud>
11118
11119     </class>
11120
11121     <class
11122         id="uvuv"
11123         controller="open-ils.cstore open-ils.pcrud"
11124         oils_obj:fieldmapper="url_verify::url_verification"
11125         oils_persist:tablename="url_verify.url_verification"
11126         reporter:label="URL Verification"
11127     >
11128         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11129             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11130                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11131                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11132             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11133             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11134             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11135             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11136                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11137         </fields>
11138
11139         <links>
11140             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11141             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11142             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11143         </links>
11144
11145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11146             <actions>
11147                 <create permission="URL_VERIFY">
11148                     <context link="attempt" jump="session" field="owning_lib"/>
11149                 </create>
11150                 <retrieve permission="URL_VERIFY">
11151                     <context link="attempt" jump="session" field="owning_lib"/>
11152                 </retrieve>
11153                 <update permission="URL_VERIFY">
11154                     <context link="attempt" jump="session" field="owning_lib"/>
11155                 </update>
11156                 <delete permission="URL_VERIFY">
11157                     <context link="attempt" jump="session" field="owning_lib"/>
11158                 </delete>
11159             </actions>
11160         </permacrud>
11161
11162     </class>
11163
11164         <class
11165                 id="cfdi"
11166                 controller="open-ils.cstore open-ils.pcrud"
11167                 oils_obj:fieldmapper="config::filter_dialog_interface"
11168                 oils_persist:tablename="config.filter_dialog_interface"
11169                 reporter:label="FilterDialog Interface">
11170                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11171                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11172                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11173                 </fields>
11174                 <links>
11175                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11176                 </links>
11177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11178                         <actions>
11179                                 <retrieve />
11180                         </actions>
11181                 </permacrud>
11182         </class>
11183
11184         <class
11185                 id="cfdfs"
11186                 controller="open-ils.cstore open-ils.pcrud"
11187                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11188                 oils_persist:tablename="config.filter_dialog_filter_set"
11189                 reporter:label="FilterDialog Filter Set">
11190                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11191                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11192                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11193                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11194                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11195                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11196                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11197                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11198                 </fields>
11199                 <links>
11200                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11201                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11202                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11203                 </links>
11204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11205                         <actions>
11206                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11207                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11208                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11209                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11210                         </actions>
11211                 </permacrud>
11212
11213         </class>
11214
11215         <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">
11216                 <fields oils_persist:primary="code">
11217                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11218                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11219                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11220                 </fields>
11221                 <links/>
11222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11223                         <actions>
11224                                 <retrieve/>
11225                         </actions>
11226                 </permacrud>
11227         </class>
11228
11229         <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">
11230                 <oils_persist:source_definition>
11231
11232             SELECT  b.id,
11233                     MAX(dcp.edit_date) AS last_delete_date
11234              FROM   biblio.record_entry b
11235                     JOIN asset.call_number cn ON (cn.record = b.id)
11236                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11237              WHERE  NOT b.deleted
11238              GROUP BY b.id
11239              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11240
11241                 </oils_persist:source_definition>
11242                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11243                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11244                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11245                 </fields>
11246                 <links>
11247                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11248                 </links>
11249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11250                         <actions>
11251                                 <retrieve/>
11252                         </actions>
11253                 </permacrud>
11254         </class>
11255
11256         <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">
11257                 <oils_persist:source_definition>
11258
11259             -- -- 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.
11260             -- -- 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
11261             -- -- may not.
11262             -- SELECT
11263             --     bre.id AS bib_id,
11264             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11265             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11266             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11267             -- FROM (
11268                 SELECT
11269                     y.bre AS id,
11270                     COALESCE( x.copy_count, 0 ) AS copy_count,
11271                     y.hold_count AS hold_count,
11272                     (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
11273                 FROM (
11274                         SELECT
11275                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11276                             COUNT(*) AS hold_count
11277                         FROM action.hold_request h
11278                         WHERE
11279                             cancel_time IS NULL
11280                             AND fulfillment_time IS NULL
11281                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11282                         GROUP BY 1
11283                     )y LEFT JOIN (
11284                         SELECT 
11285                             (SELECT id
11286                                 FROM biblio.record_entry 
11287                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11288                             ) AS bre, 
11289                             COUNT(*) AS copy_count
11290                         FROM asset.copy
11291                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11292                         WHERE copy.holdable 
11293                             AND NOT copy.deleted 
11294                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11295                         GROUP BY 1
11296                     )x ON x.bre = y.bre
11297                 -- )z RIGHT JOIN (
11298                 --     SELECT id
11299                 --     FROM biblio.record_entry
11300                 --     WHERE NOT deleted
11301                 -- )bre ON (z.bib_id = bre.id)
11302                 
11303
11304                 </oils_persist:source_definition>
11305                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11306                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11307                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11308                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11309                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11310                 </fields>
11311                 <links>
11312                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11313                 </links>
11314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11315                         <actions>
11316                                 <retrieve/>
11317                         </actions>
11318                 </permacrud>
11319         </class>
11320
11321         <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">
11322                 <oils_persist:source_definition>
11323             SELECT *,
11324                 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,
11325                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11326             FROM
11327                 (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
11328                     FROM
11329                         action.hold_request ahr
11330                         JOIN reporter.hold_request_record rhrr USING (id)
11331                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11332                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11333                     WHERE
11334                         ahr.cancel_time IS NULL
11335                         AND ahr.fulfillment_time IS NULL
11336                     GROUP BY bib_record, pickup_lib
11337                 )x
11338                 JOIN
11339                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11340                     FROM
11341                         action.hold_request ahr
11342                         JOIN reporter.hold_request_record rhrr USING (id)
11343                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11344                     WHERE
11345                         ahr.cancel_time IS NULL
11346                         AND ahr.fulfillment_time IS NULL
11347                     GROUP BY bib_record
11348                 )y
11349                 USING (id)
11350                 </oils_persist:source_definition>
11351                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11352                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11353                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11354                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11355                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11356                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11357                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11358                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11359                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11360                 </fields>
11361                 <links>
11362                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11363                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11364                 </links>
11365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11366                         <actions>
11367                                 <retrieve/>
11368                         </actions>
11369                 </permacrud>
11370         </class>
11371
11372         <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) ">
11373                 <oils_persist:source_definition>
11374             WITH counts_at_ou AS (
11375                 SELECT  rhrr.bib_record AS id,
11376                         aou.id AS pickup_lib_or_desc,
11377                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11378                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11379                   FROM  actor.org_unit aou
11380                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11381                         action.hold_request ahr
11382                         JOIN reporter.hold_request_record rhrr USING (id)
11383                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11384                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11385                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11386                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11387                         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
11388                   GROUP BY 1, 2
11389             )
11390             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11391                    y.holds_everywhere, y.copy_count_everywhere,
11392                 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,
11393                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11394             FROM counts_at_ou x
11395                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11396                     FROM
11397                         action.hold_request ahr
11398                         JOIN reporter.hold_request_record rhrr USING (id)
11399                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11400                     WHERE
11401                         ahr.cancel_time IS NULL
11402                         AND ahr.fulfillment_time IS NULL
11403                     GROUP BY bib_record
11404                 )y
11405                 USING (id)
11406                 </oils_persist:source_definition>
11407                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11408                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11409                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11410                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11411                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11412                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11413                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11414                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11415                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11416                 </fields>
11417                 <links>
11418                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11419                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11420                 </links>
11421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11422                         <actions>
11423                                 <retrieve/>
11424                         </actions>
11425                 </permacrud>
11426         </class>
11427
11428         <class id="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">
11429                 <oils_persist:source_definition>
11430             SELECT
11431                 ac.id,
11432                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11433                 MAX(actac.xact_start) AS last_circ
11434             FROM asset.copy ac
11435                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11436             GROUP BY ac.id
11437
11438             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11439             --SELECT
11440             --    ac.id,
11441             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11442             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11443             --FROM asset.copy ac
11444             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11445             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11446             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11447                 </oils_persist:source_definition>
11448                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11449                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11450                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11451                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11452                 </fields>
11453                 <links>
11454                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11455                 </links>
11456                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11457                         <actions>
11458                                 <retrieve/>
11459                         </actions>
11460                 </permacrud>
11461         </class>
11462
11463         <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">
11464                 <fields oils_persist:primary="id">
11465                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11466                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11467                 </fields>
11468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11469                         <actions>
11470                                 <retrieve/>
11471                         </actions>
11472                 </permacrud>
11473         </class>
11474
11475         <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">
11476                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11477                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11478                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11479                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11480                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11481                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11482                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11483                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11484                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11485                 </fields>
11486                 <links>
11487                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11488                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11489                 </links>
11490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11491                         <actions>
11492                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11493                                 <retrieve/>
11494                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11495                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11496                         </actions>
11497                 </permacrud>
11498         </class>
11499
11500         <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">
11501                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11502                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11503                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11504                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11505                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11506                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11507                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11508                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11509                 </fields>
11510                 <links>
11511                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11512                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11513                 </links>
11514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11515                         <actions>
11516                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11517                                 <retrieve/>
11518                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11519                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11520                         </actions>
11521                 </permacrud>
11522         </class>
11523
11524
11525         <!-- ********************************************************************************************************************* -->
11526         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11527         <!-- ********************************************************************************************************************* -->
11528         <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">
11529                 <fields oils_persist:primary="id">
11530                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11531                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11532                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11533                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11534                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11535                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11536                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11537                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11538                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11539                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11540                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11541                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11542                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11543                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11544                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11545                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11546                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11547                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11548                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11549                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11550                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11551                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11552                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11553                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11554                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11555                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11556                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11557                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11558                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11559                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11560                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11561                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11562                 </fields>
11563                 <links>
11564                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11565                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11566                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11567                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11568                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11569                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11570                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11571                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11572                 </links>
11573         </class>
11574
11575         <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">
11576                 <fields oils_persist:primary="id">
11577                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11578                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11579                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11580                 </fields>
11581                 <links>
11582                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11583                 </links>
11584         </class>
11585
11586         <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">
11587                 <fields oils_persist:primary="id">
11588                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11589                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11590                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11591                 </fields>
11592                 <links>
11593                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11594                 </links>
11595         </class>
11596
11597         <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">
11598                 <fields oils_persist:primary="id">
11599                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11600
11601                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11602                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11603                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11604
11605                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11606                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11607                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11608
11609                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11610                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11611
11612                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11613                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11614                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11615
11616                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11617                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11618
11619                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11620                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11621                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11622
11623                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11624                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11625                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11626
11627                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11628                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11629                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11630                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11631
11632                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11633                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11634
11635                 </fields>
11636                 <links>
11637                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11638                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11639                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11640                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11641                 </links>
11642         </class>
11643
11644         <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">
11645                 <oils_persist:source_definition>
11646
11647             SELECT
11648                 po.ordering_agency AS ordering_agency,
11649                 po.id AS purchase_order,
11650                 li.id AS lineitem,
11651                 lid.id AS lineitem_detail,
11652                 cpa.id AS claim_policy_action
11653             FROM
11654                 acq.lineitem_detail lid
11655                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11656                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11657                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11658                 JOIN acq.claim_policy_action cpa ON (
11659                     cpa.claim_policy = cp.id
11660
11661                     -- we only care about claim policy actions whose claim
11662                     -- interval we'd reached or exceeded
11663                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11664
11665                     -- filter out all claim policy actions where claim events
11666                     -- have occurred on or after the action's action_interval
11667                     AND NOT EXISTS (
11668                         SELECT 1
11669                         FROM
11670                             acq.claim_event evt
11671                             JOIN acq.claim claim ON (
11672                                 claim.id = evt.claim
11673                                 AND claim.lineitem_detail = lid.id
11674                             )
11675                         WHERE
11676                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11677                     )
11678                 )
11679             WHERE
11680                 lid.cancel_reason IS NULL
11681                 AND li.cancel_reason IS NULL -- belt/suspenders
11682                 AND po.cancel_reason IS NULL -- belt/suspenders
11683                 AND lid.recv_time IS NULL
11684                 AND po.state = 'on-order'
11685             ORDER BY 1, 2, 3, 4, 5
11686
11687                 </oils_persist:source_definition>
11688                 <fields>
11689                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11690                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11691                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11692                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11693                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11694                 </fields>
11695                 <links>
11696                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11697                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11698                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11699                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11700                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11701                 </links>
11702         </class>
11703         <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">
11704                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11705                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11706                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11707                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11708                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11709                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11710                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11711                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11712                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11713                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11714                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11715                 </fields>
11716                 <links>
11717                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11718                 </links>
11719     </class>
11720         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11721                 <oils_persist:source_definition>
11722             SELECT * FROM acq.lineitem_summary 
11723                                 WHERE item_count > (invoice_count + cancel_count)
11724         </oils_persist:source_definition>
11725                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11726                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11727                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11728                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11729                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11730                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11731                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11732                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11733                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11734                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11735                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11736                 </fields>
11737                 <links>
11738                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11739                 </links>
11740     </class>
11741         <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">
11742                 <oils_persist:source_definition>
11743
11744                         SELECT  t.*
11745                           FROM  action.transit_copy t
11746                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11747                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11748                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11749
11750                 </oils_persist:source_definition>
11751                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11752                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11753                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11754                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11755                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11756                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11757                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11758                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11759                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11760                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11761                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11762                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11763                 </fields>
11764                 <links>
11765                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11766                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11767                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11768                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11769                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11770                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11771                 </links>
11772         </class>
11773
11774     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11775                 <oils_persist:source_definition>
11776
11777         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11778                 SELECT
11779                         cp.id as copy,
11780                         COUNT(circ.id),
11781                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11782                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11783                 FROM
11784                         asset.copy cp
11785                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11786                 GROUP BY 1, 3, 4
11787                 UNION ALL
11788                 SELECT
11789                         cp.id as copy,
11790                         COUNT(circ.id),
11791                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11792                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11793                 FROM
11794                         asset.copy cp
11795                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11796                 GROUP BY 1, 3, 4
11797                 UNION ALL
11798                 SELECT
11799                         id as copy,
11800                         circ_count,
11801                         -1 AS year,
11802                         false as is_renewal
11803                 FROM
11804                         extend_reporter.legacy_circ_count
11805         )x GROUP BY 1, 3, 4
11806
11807                 </oils_persist:source_definition>
11808         <fields>
11809             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11810             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11811             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11812             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11813         </fields>
11814                 <links>
11815                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11816                 </links>
11817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11818                         <actions>
11819                                 <retrieve/>
11820                         </actions>
11821                 </permacrud>
11822     </class>
11823
11824         <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">
11825                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11826                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11827                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11828                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11829                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11830                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11831                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11832                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11833                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11834                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11835                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11836                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11837                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11838                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11839                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11840                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11841                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11842                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11843                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11844                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11845                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11846                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11847                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11848                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11849                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11850                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11851                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11852                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11853                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11854                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11855                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11856                 </fields>
11857                 <links>
11858                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11859                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11860                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11861                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11862                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11863                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11864                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11865                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11866                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11867                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11868                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11869                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11870                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11871                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11872                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11873                 </links>
11874         </class>
11875
11876     <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">
11877         <fields oils_persist:primary="id">
11878             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11879             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11880             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11881             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11882             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11883             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11884             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11885             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11886             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11887             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11888             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11889             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11890             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11891             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11892             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11893             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11894             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11895             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11896             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11897             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11898             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11899             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11900             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11901             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11902             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11903             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11904             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11905             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11906             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11907             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11908             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11909             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11910             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11911             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11912         </fields>
11913         <links>
11914             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11915             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11916             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11917             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11918             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11919             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11920             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11921             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11922         </links>
11923     </class>
11924
11925     <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">
11926         <fields oils_persist:primary="id">
11927             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11928             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11929             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11930             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11931         </fields>
11932         <links>
11933             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11934             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11935         </links>
11936     </class>
11937
11938     <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">
11939         <fields oils_persist:primary="owning_lib">
11940             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11941             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11942             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11943         </fields>
11944         <links>
11945             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11946         </links>
11947     </class>
11948
11949     <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">
11950         <fields oils_persist:primary="id">
11951             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11952             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11953             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11954             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11955             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11956         </fields>
11957         <links>
11958             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11959             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11960             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11961         </links>
11962     </class>
11963
11964     <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">
11965         <fields oils_persist:primary="circ_lib">
11966             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11967             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11968             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11969             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11970         </fields>
11971         <links>
11972             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11973             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11974         </links>
11975     </class>
11976
11977     <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">
11978         <fields oils_persist:primary="id">
11979             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11980             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11981             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11982             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11983             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11984         </fields>
11985         <links>
11986             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11987             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11988             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11989         </links>
11990     </class>
11991
11992     <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">
11993         <fields oils_persist:primary="home_ou">
11994             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11995             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11996             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11997             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11998         </fields>
11999         <links>
12000             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12001             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12002         </links>
12003     </class>
12004         <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">
12005                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12006                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12007                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12008                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12009                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12010                 </fields>
12011                 <links>
12012                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12013                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12014                 </links>
12015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12016                         <actions>
12017                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12018                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12019                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12020                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12021                         </actions>
12022                 </permacrud>
12023         </class>
12024         <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">
12025                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12026                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12027                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12028                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12029                 </fields>
12030                 <links>
12031                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12032                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12033                         </links>
12034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12035                 <actions>
12036                                 <create permission="ADMIN_ACQ_FUND_TAG">
12037                                         <context link="tag" field="owner"/>
12038                                 </create>
12039                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12040                                         <context link="tag" field="owner"/>
12041                                 </retrieve>
12042                                 <update permission="ADMIN_ACQ_FUND_TAG">
12043                                         <context link="tag" field="owner"/>
12044                                 </update>
12045                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12046                                         <context link="tag" field="owner"/>
12047                                 </delete>
12048                         </actions>
12049                 </permacrud>
12050         </class>
12051         <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">
12052                 <oils_persist:source_definition><![CDATA[
12053                 SELECT
12054                         poi.purchase_order AS purchase_order,
12055                         ii.invoice AS invoice,
12056                         NULL AS lineitem,
12057                         poi.id AS po_item,
12058                         NULL AS picklist
12059                 FROM
12060                         acq.po_item poi
12061                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12062                 UNION SELECT
12063                         jub.purchase_order AS purchase_order,
12064                         ie.invoice AS invoice,
12065                         jub.id AS lineitem,
12066                         NULL AS po_item,
12067                         jub.picklist AS picklist
12068                 FROM
12069                         acq.lineitem jub
12070                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12071                 UNION SELECT
12072                         ii.purchase_order AS purchase_order,
12073                         ii.invoice AS invoice,
12074                         NULL AS lineitem,
12075                         NULL AS po_item,
12076                         NULL AS picklist
12077                 FROM
12078                         acq.invoice_item ii
12079                 WHERE ii.po_item IS NULL
12080                 UNION SELECT
12081                         ie.purchase_order AS purchase_order,
12082                         ie.invoice AS invoice,
12083                         NULL AS lineitem,
12084                         NULL AS po_item,
12085                         NULL AS picklist
12086                 FROM
12087                         acq.invoice_entry ie
12088                 WHERE ie.lineitem IS NULL
12089                 UNION SELECT
12090                         NULL AS purchase_order,
12091                         NULL AS invoice,
12092                         jub.id AS lineitem,
12093                         NULL AS po_item,
12094                         jub.picklist AS picklist
12095                 FROM
12096                         acq.lineitem jub
12097                 WHERE jub.purchase_order IS NULL
12098                 ]]></oils_persist:source_definition>
12099                 <fields>
12100                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12101                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12102                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12103                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12104                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12105                 </fields>
12106                 <links>
12107                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12108                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12109                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12110                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12111                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12112                 </links>
12113         </class>
12114         <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">
12115                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12116                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12117                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12118                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12119                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12120                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12121                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12122                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12123                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12124                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12125                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12126                 </fields>
12127                 <links>
12128                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12129                 </links>
12130                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12131                         <actions>
12132                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12133                                 <retrieve/>
12134                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12135                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12136                         </actions>
12137                 </permacrud>
12138         </class>
12139
12140         <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">
12141                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12142                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12143                         <field name="date_applied" reporter:datatype="timestamp"/>
12144                         <field name="org" reporter:datatype="org_unit"/>
12145                         <field name="original_value" reporter:datatype="text"/>
12146                         <field name="new_value" reporter:datatype="text"/>
12147                         <field name="field_name" reporter:datatype="link"/>
12148                 </fields>
12149                 <links>
12150                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12151                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12152                 </links>
12153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12154                         <actions>
12155                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12156                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12157                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12158                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12159                         </actions>
12160                 </permacrud>
12161         </class>
12162         <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">
12163                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12164                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12165                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12166                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12167                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12168                 </fields>
12169                 <links>
12170                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12171                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12172                 </links>
12173         </class>
12174         <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">
12175                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12176                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12177                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12178                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12179                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12180                 </fields>
12181                 <links>
12182                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12183                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12184                 </links>
12185         </class>
12186         <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">
12187                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12188                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12189                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12190                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12191                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12192                 </fields>
12193                 <links>
12194                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12195                 </links>
12196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12197                         <actions>
12198                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12199                                 <retrieve/>
12200                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12201                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12202                         </actions>
12203                 </permacrud>
12204         </class>
12205         <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">
12206                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12207                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12208                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12209                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12210                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12211                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12212                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12213                 </fields>
12214                 <links>
12215                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12216                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12217                 </links>
12218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12219                         <actions>
12220                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12221                                 <retrieve/>
12222                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12223                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12224                         </actions>
12225                 </permacrud>
12226         </class>
12227         <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">
12228                 <fields oils_persist:primary="code">
12229                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12230                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12231                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12232                 </fields>
12233                 <links>
12234                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12235                 </links>
12236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12237                         <actions>
12238                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12239                                 <retrieve/>
12240                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12241                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12242                         </actions>
12243                 </permacrud>
12244         </class>
12245         <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">
12246                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12247                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12248                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12249                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12250                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12251                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12252                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12253                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12254                 </fields>
12255                 <links>
12256                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12257                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12258                 </links>
12259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12260                         <actions>
12261                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12262                                 <retrieve/>
12263                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12264                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12265                         </actions>
12266                 </permacrud>
12267         </class>
12268         <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">
12269                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12270                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12271                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12272                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12273                 </fields>
12274                 <links>
12275                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12276                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12277                 </links>
12278                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12279                         <actions>
12280                                 <create permission="UPDATE_COPY">
12281                     <context link="copy" field="circ_lib"/>
12282                 </create>
12283                                 <retrieve/>
12284                                 <update permission="UPDATE_COPY">
12285                     <context link="copy" field="circ_lib"/>
12286                 </update>
12287                                 <delete permission="UPDATE_COPY">
12288                     <context link="copy" field="circ_lib"/>
12289                 </delete>
12290                         </actions>
12291                 </permacrud>
12292         </class>
12293         <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">
12294         <oils_persist:source_definition>
12295         SELECT ahcm.target_copy AS id,count(*) AS count
12296          FROM
12297          action.hold_request ahr,
12298          action.hold_copy_map ahcm
12299          WHERE
12300          ahr.cancel_time IS NULL AND
12301          ahr.fulfillment_time IS NULL AND
12302          ahr.capture_time IS NULL AND
12303          ahr.id = ahcm.hold
12304          GROUP BY ahcm.target_copy
12305         </oils_persist:source_definition>
12306         <fields oils_persist:primary="id">
12307             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12308             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12309         </fields>
12310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12311             <actions>
12312                <retrieve/>
12313             </actions>
12314         </permacrud>
12315         </class>
12316
12317         <!-- ********************************************************************************************************************* -->
12318
12319 </IDL>
12320
12321 <!--
12322     vim:noet:ts=4:sw=4:
12323 -->