]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1727487 Display field seed data WIP
[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="creators" reporter:label="Creators" reporter:datatype="text"/>
3811                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
3812                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
3813                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
3814                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
3815                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
3816                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
3817                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
3818                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
3819                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
3820                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
3821                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
3822                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
3823                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
3824                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
3825                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
3826                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
3827                 </fields>
3828                 <links>
3829                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3830                 </links>
3831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3832                         <actions>
3833                                 <retrieve/>
3834                         </actions>
3835                 </permacrud>
3836         </class>
3837
3838         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
3839                 oils_persist:tablename="config.display_field_map"
3840                 oils_obj:fieldmapper="config::display_field_map"
3841                 oils_persist:field_safe="true"
3842                 reporter:label="Display Field Map" 
3843                 oils_persist:readonly="true">
3844                 <fields oils_persist:primary="name">
3845                         <field name="name" reporter:datatype="text"/>
3846                         <field name="field" reporter:datatype="link"/>
3847                         <field name="multi" reporter:datatype="bool"/>
3848                 </fields>
3849                 <links>
3850                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3851                 </links>
3852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3853                         <actions>
3854                                 <retrieve/>
3855                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3856                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3857                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3858                         </actions>
3859                 </permacrud>
3860         </class>
3861
3862         <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">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3864                         <field name="id" reporter:datatype="id" />
3865                         <field name="field" reporter:datatype="link"/>
3866                         <field name="source" reporter:datatype="link"/>
3867                         <field name="value"  reporter:datatype="text"/>
3868                 </fields>
3869                 <links>
3870                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3871                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3872                 </links>
3873         </class>
3874         <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">
3875                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3876                         <field name="id" reporter:datatype="id" />
3877                         <field name="value" reporter:datatype="text"/>
3878                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3879                 </fields>
3880                 <links>
3881                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3882                 </links>
3883         </class>
3884         <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">
3885                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3886                         <field name="id" reporter:datatype="id" />
3887                         <field name="entry" reporter:datatype="link"/>
3888                         <field name="def" reporter:datatype="link"/>
3889                         <field name="source" reporter:datatype="link"/>
3890                 </fields>
3891                 <links>
3892                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3893                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3894                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3895                 </links>
3896         </class>
3897         <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">
3898                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3899                         <field name="id" reporter:datatype="id" />
3900                         <field name="entry" reporter:datatype="link"/>
3901                         <field name="simple_heading" reporter:datatype="link"/>
3902                 </fields>
3903                 <links>
3904                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3905                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3906                 </links>
3907         </class>
3908         <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">
3909                 <oils_persist:source_definition>
3910                         SELECT * FROM metabib.author_field_entry
3911                                                 UNION ALL
3912                         SELECT * FROM metabib.keyword_field_entry
3913                                                 UNION ALL
3914                         SELECT * FROM metabib.identifier_field_entry
3915                                                 UNION ALL
3916                         SELECT * FROM metabib.title_field_entry
3917                                                 UNION ALL
3918                         SELECT * FROM metabib.subject_field_entry
3919                                                 UNION ALL
3920                         SELECT * FROM metabib.series_field_entry
3921                 </oils_persist:source_definition>
3922                 <fields>
3923                         <field name="field" reporter:datatype="link"/>
3924                         <field name="id" reporter:datatype="id" />
3925                         <field name="source" reporter:datatype="link"/>
3926                         <field name="value"  reporter:datatype="text"/>
3927                 </fields>
3928                 <links>
3929                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3930                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3931                 </links>
3932         </class>
3933         <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">
3934                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3935                         <field name="field" reporter:datatype="link"/>
3936                         <field name="id" reporter:datatype="id" />
3937                         <field name="source" reporter:datatype="link"/>
3938                         <field name="value"  reporter:datatype="text"/>
3939                 </fields>
3940                 <links>
3941                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3942                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3943                 </links>
3944         </class>
3945         <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">
3946                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3947                         <field name="accepting_usr" reporter:datatype="link"/>
3948                         <field name="amount" reporter:datatype="money" />
3949                         <field name="amount_collected" reporter:datatype="money" />
3950                         <field name="cash_drawer" reporter:datatype="link"/>
3951                         <field name="id" reporter:datatype="id" />
3952                         <field name="note"  reporter:datatype="text"/>
3953                         <field name="payment_ts" reporter:datatype="timestamp"/>
3954                         <field name="xact" reporter:datatype="link"/>
3955                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3956                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3957                 </fields>
3958                 <links>
3959                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3960                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3961                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3962                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3963                 </links>
3964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3965             <actions>
3966                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3967                     <context link="xact" jump="usr" field="home_ou"/>
3968                 </retrieve>
3969                         </actions>
3970                 </permacrud>
3971         </class>
3972         <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">
3973                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3974                         <field name="accepting_usr" reporter:datatype="link"/>
3975                         <field name="amount" reporter:datatype="money" />
3976                         <field name="amount_collected" reporter:datatype="money" />
3977                         <field name="id" reporter:datatype="id" />
3978                         <field name="note"  reporter:datatype="text"/>
3979                         <field name="payment_ts" reporter:datatype="timestamp"/>
3980                         <field name="xact" reporter:datatype="link"/>
3981                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3982                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3983                 </fields>
3984                 <links>
3985                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3986                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3987                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3988                 </links>
3989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3990             <actions>
3991                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3992                     <context link="xact" jump="usr" field="home_ou"/>
3993                 </retrieve>
3994                         </actions>
3995                 </permacrud>
3996         </class>
3997         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3998                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3999                         <field name="accepting_usr" reporter:datatype="link"/>
4000                         <field name="amount" reporter:datatype="money" />
4001                         <field name="amount_collected" reporter:datatype="money" />
4002                         <field name="id" reporter:datatype="id" />
4003                         <field name="note"  reporter:datatype="text"/>
4004                         <field name="payment_ts" reporter:datatype="timestamp"/>
4005                         <field name="xact" reporter:datatype="link"/>
4006                         <field name="billing" reporter:datatype="link"/>
4007                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4008                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4009                 </fields>
4010                 <links>
4011                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4012                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4013                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4014                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4015                 </links>
4016         </class>
4017         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4018                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4019                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4020                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4021                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4022                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4023                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4024                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4025                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4026                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4027                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4028                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4029                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4030                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4031                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4032                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4033                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4034                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4035                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4036                 </fields>
4037                 <links>
4038                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4039                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4040                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4041                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4042                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4043                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4044                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4045                 </links>
4046         </class>
4047
4048         <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">
4049                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4050                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4051                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4052                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4053                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4054                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4055                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4056                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4057                 </fields>
4058                 <links/>
4059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4060             <actions>
4061                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4062                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4063                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4064                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4065             </actions>
4066         </permacrud>
4067         </class>
4068         <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">
4069                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4070                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4071                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4072                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4073                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4074                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4075                 </fields>
4076                 <links>
4077                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4078                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4079                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4080         </links>
4081         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4082             <actions>
4083                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4084                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4085                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4086                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4087             </actions>
4088         </permacrud>
4089         </class>
4090         <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">
4091                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4092                         <field name="holdable" reporter:datatype="bool"/>
4093                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4094                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4095                         <field name="opac_visible" reporter:datatype="bool"/>
4096             <field name="copy_active" reporter:datatype="bool"/>
4097             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4098             <field name="is_available" reporter:datatype="bool"/>
4099                 </fields>
4100                 <links/>
4101         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4102             <actions>
4103                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4104                 <retrieve/>
4105                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4106                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4107             </actions>
4108         </permacrud>
4109         </class>
4110         <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">
4111                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4112                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4113                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4114                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4115                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4116                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4117                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4118                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4119                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4120                 </fields>
4121                 <links>
4122                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4123                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4124                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4125                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4126                 </links>
4127                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4128                         <actions>
4129                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4130                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4131                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4132                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4133                         </actions>
4134                 </permacrud>
4135         </class>
4136         <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">
4137                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4138                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4139                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4140                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4141                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4142                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4143                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4144                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4145                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4146                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4147                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4148                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4149                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4150                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4151                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4152                 </fields>
4153                 <links>
4154                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4155                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4156                 </links>
4157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4158                         <actions>
4159                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4160                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4161                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4162                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4163                         </actions>
4164                 </permacrud>
4165         </class>
4166         <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">
4167                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4168                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4169                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4170                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4171                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4172                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4173                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4174                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4175                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4176                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4177                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4178                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4179                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4180                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4181                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4182                 </fields>
4183                 <links>
4184                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4185                 </links>
4186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4187                         <actions>
4188                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4189                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4190                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4191                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4192                         </actions>
4193                 </permacrud>
4194         </class>
4195
4196
4197         <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">
4198                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4199                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4200                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4201                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4202                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4203                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4204                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4205                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4206                 </fields>
4207                 <links>
4208                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4209                 </links>
4210         </class>
4211
4212         <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">
4213                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4214                         <field name="call_number" />
4215                         <field name="create_date" reporter:datatype="timestamp"/>
4216                         <field name="creator" reporter:datatype="link"/>
4217                         <field name="id" reporter:datatype="id" />
4218                         <field name="pub" reporter:datatype="bool"/>
4219                         <field name="title"  reporter:datatype="text"/>
4220                         <field name="value"  reporter:datatype="text"/>
4221                 </fields>
4222                 <links>
4223                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4224                 </links>
4225         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4226             <actions>
4227                 <create permission="CREATE_VOLUME_NOTE">
4228                     <context link="call_number" field="owning_lib"/>
4229                 </create>
4230                 <retrieve permission="VIEW_VOLUME_NOTES">
4231                     <context link="call_number" field="owning_lib"/>
4232                 </retrieve>
4233                 <update permission="UPDATE_VOLUME_NOTE">
4234                     <context link="call_number" field="owning_lib"/>
4235                 </update>
4236                 <delete permission="DELETE_VOLUME_NOTE">
4237                     <context link="call_number" field="owning_lib"/>
4238                 </delete>
4239             </actions>
4240         </permacrud>
4241         </class>
4242         <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">
4243                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4244                         <field name="create_date" reporter:datatype="timestamp"/>
4245                         <field name="creator" reporter:datatype="link"/>
4246                         <field name="edit_date" reporter:datatype="timestamp"/>
4247                         <field name="editor" reporter:datatype="link"/>
4248                         <field name="id" reporter:datatype="id" />
4249                         <field name="record" reporter:datatype="link"/>
4250                         <field name="value" reporter:datatype="text"/>
4251                 </fields>
4252                 <links>
4253                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4254                 </links>
4255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4256             <actions>
4257                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4258                 <retrieve/>
4259                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4260                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4261             </actions>
4262         </permacrud>
4263         </class>
4264         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4265         <oils_persist:source_definition>
4266 SELECT  usr,
4267         SUM(
4268             CASE
4269                 WHEN (
4270                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4271                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4272                 ) THEN 1
4273                 ELSE 0
4274             END
4275         ) AS out,
4276
4277         SUM(
4278             CASE
4279                 WHEN (
4280                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4281                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4282                 ) THEN 1
4283                 ELSE 0
4284             END
4285         ) AS overdue,
4286
4287         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4288         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4289         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4290   FROM  action.circulation
4291   WHERE checkin_time IS NULL
4292   GROUP BY 1
4293         </oils_persist:source_definition>
4294         <fields oils_persist:primary="usr">
4295             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4296             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4297             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4298             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4299             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4300             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4301         </fields>
4302         <links>
4303             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4304         </links>
4305         </class>
4306         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4307         <oils_persist:source_definition>
4308 SELECT  usr,
4309         STRING_AGG(
4310             CASE
4311                 WHEN (
4312                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4313                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4314                 ) THEN id::TEXT
4315                 ELSE '0'
4316             END
4317         ,',') AS out,
4318
4319         STRING_AGG(
4320             CASE
4321                 WHEN (
4322                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4323                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4324                 ) THEN id::TEXT
4325                 ELSE '0'
4326             END
4327         ,',') AS overdue,
4328
4329         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4330         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4331         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4332   FROM  action.circulation
4333   WHERE checkin_time IS NULL
4334   GROUP BY 1
4335         </oils_persist:source_definition>
4336         <fields oils_persist:primary="usr">
4337             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4338             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4339             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4340             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4341             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4342             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4343         </fields>
4344         <links>
4345             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4346         </links>
4347         </class>
4348         <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">
4349                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4350                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4351                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4352                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4353                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4354                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4355                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4356                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4357                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4358                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4359                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4360                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4361                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4362                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4363                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4364                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4365                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4366                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4367                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4368                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4369                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4370                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4371                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4372                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4373                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4374                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4375                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4376                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4377                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4378                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4379                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4380                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4381                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4382                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4383                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4384                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4385                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4386                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4387                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4388                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4389                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4390                 </fields>
4391                 <links>
4392                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4393                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4394                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4395                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4396                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4397                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4398                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4399                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4400                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4401                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4402                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4403                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4404                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4405                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4406                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4407                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4408                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4409                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4410                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4411                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4412                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4413                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4414                 </links>
4415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4416                         <actions>
4417                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4418                         </actions>
4419                 </permacrud>
4420         </class>
4421         <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">
4422                 <fields>
4423                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4424                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4425                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4426                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4427                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4428                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4429                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4430                 </fields>
4431                 <links>
4432                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4433                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4434                 </links>
4435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4436                         <actions>
4437                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4438                         </actions>
4439                 </permacrud>
4440         </class>
4441         <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">
4442                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4443                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4444                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4445                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4446                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4447                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4448                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4449                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4450                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4451                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4452                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4453                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4454                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4455                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4456                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4457                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4458                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4459                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4460                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4461                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4462                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4463                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4464                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4465                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4466                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4467                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4468                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4469                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4470                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4471                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4472                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4473                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4474                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4475                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4476                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4477                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4478                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4479                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4480                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4481                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4482                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4483                 </fields>
4484                 <links>
4485                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4486                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4487                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4488                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4489                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4490                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4491                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4492                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4493                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4494                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4495                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4496                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4497                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4498                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4499                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4500                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4501                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4502                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4503                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4504                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4505                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4506                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4507                 </links>
4508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4509                         <actions>
4510                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4511                         </actions>
4512                 </permacrud>
4513         </class>
4514
4515         <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">
4516                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4517                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4518                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4519                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4520                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4521                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4522                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4523                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4524                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4525                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4526                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4527                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4528                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4529                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4530                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4531                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4532                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4533                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4534                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4535                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4536                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4537                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4538                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4539                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4540                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4541                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4542                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4543                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4544                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4545                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4546                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4547                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4548                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4549                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4550                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4551                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4552                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4553                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4554                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4555                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4556                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4557                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4558                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4559                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4560                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4561                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4562                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4563                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4564                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4565                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4566                 </fields>
4567                 <links>
4568                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4569                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4570                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4571                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4572                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4573                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4574                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4575                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4576                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4577                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4578                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4579                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4580                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4581                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4582                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4583                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4584                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4585                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4586                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4587                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4588                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4589                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4590                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4591                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4592                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4593                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4594                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4595                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4596                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4597                 </links>
4598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4599                         <actions>
4600                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4601                         </actions>
4602                 </permacrud>
4603         </class>
4604         <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">
4605                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4606                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4607                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4608                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4609                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4610                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4611                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4612                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4613                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4614                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4615                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4616                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4617                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4618                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4619                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4620                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4621                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4622                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4623                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4624                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4625                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4626                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4627                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4628                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4629                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4630                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4631                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4632                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4633                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4634                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4635                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4636                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4637                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4638                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4639                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4640                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4641                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4642                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4643                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4644                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4645                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4646                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4647                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4648                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4649                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4650                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4651                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4652                 </fields>
4653                 <links>
4654                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4655                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4656                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4657                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4658                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4659                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4660                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4661                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4662                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4663                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4664                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4665                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4666                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4667                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4668                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4669                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4670                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4671                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4672                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4673                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4674                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4675                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4676                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4677                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4678                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4679                 </links>
4680         </class>
4681         <class id="auch" 
4682                 controller="open-ils.cstore" 
4683                 oils_obj:fieldmapper="action::user_circ_history" 
4684                 oils_persist:tablename="action.usr_circ_history" 
4685                 reporter:label="User Checkout History">
4686                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4687                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4688                         <!-- prevent reporting on the user that owns the checkout history -->
4689                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4690                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4691                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4692                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4693                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4694                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4695                 </fields>
4696                 <links>
4697                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4698                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4699                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4700                 </links>
4701         </class>
4702         <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">
4703                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4704                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4705                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4706                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4707                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4708                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4709                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4710                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4711                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4712                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4713                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4714                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4715                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4716                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4717                 </fields>
4718                 <links>
4719                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4720                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4721                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4722                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4723                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4724                 </links>
4725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4726                         <actions>
4727                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4728                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4729                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4730                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4731                         </actions>
4732                 </permacrud>
4733         </class>
4734
4735         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4736                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4737                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4738                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4739                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4740                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4741                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4742                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4743                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4744                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4745                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4746                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4747                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4748                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4749                 </fields>
4750                 <links>
4751                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4752                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4753                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4754                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4755                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4756                 </links>
4757                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4758                         <actions>
4759                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4760                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4761                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4762                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4763                         </actions>
4764                 </permacrud>
4765         </class>
4766         
4767         <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">
4768                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4769                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4770                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4771                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4772                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4773                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4774                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4775                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4776                 </fields>
4777                 <links>
4778                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4779                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4780                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4781                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4782                 </links>
4783                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4784                         <actions>
4785                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4786                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4787                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4788                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4789                         </actions>
4790                 </permacrud>
4791         </class>
4792         
4793         <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">
4794                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4795                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4796                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4797                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4798                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4799                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4800                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4801                 </fields>
4802                 <links>
4803                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4804                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4805                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4806                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4807                 </links>
4808                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4809                         <actions>
4810                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4811                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4812                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4813                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4814                         </actions>
4815                 </permacrud>
4816         </class>
4817         
4818         <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">
4819                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4820                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4821                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4822                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4823                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4824                 </fields>
4825                 <links>
4826                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4827                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4828                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4829                 </links>
4830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4831                         <actions>
4832                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4833                     <context link="resource" field="owner" />
4834                 </create>
4835                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4836                     <context link="resource" field="owner" />
4837                 </retrieve>
4838                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4839                     <context link="resource" field="owner" />
4840                 </update>
4841                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4842                     <context link="resource" field="owner" />
4843                 </delete>
4844                         </actions>
4845                 </permacrud>
4846         </class>
4847         
4848         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4849                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4850                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4851                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4852                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4853                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4854                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4855                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4856                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4857                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4858                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4859                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4860                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4861                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4862                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4863                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4864                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4865                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4866                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4867                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4868                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4869                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4870                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4871                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4872                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4873                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4874                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4875                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4876                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4877                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4878                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4879                 </fields>
4880                 <links>
4881                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4882                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4883                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4884                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4885                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4886                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4887                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4888                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4889                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4890                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4891                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4892                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4893                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4894                 </links>
4895                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4896                         <actions>
4897                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4898                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4899                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4900                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4901                         </actions>
4902                 </permacrud>
4903         </class>
4904         
4905         <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">
4906                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4907                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4908                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4909                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4910                 </fields>
4911                 <links>
4912                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4913                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4914                 </links>
4915                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4916                         <actions>
4917                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4918                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4919                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4920                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4921                         </actions>
4922                 </permacrud>
4923         </class>
4924
4925         <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">
4926                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4927                         <field name="bucket" reporter:datatype="link"/>
4928                         <field name="id" reporter:datatype="id" />
4929                         <field name="target_call_number" reporter:datatype="link" />
4930                         <field name="create_time" reporter:datatype="timestamp" />
4931                         <field name="pos" reporter:datatype="int" />
4932                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4933                 </fields>
4934                 <links>
4935                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4936                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4937             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4938                 </links>
4939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4940                         <actions>
4941                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
4942                     <context link="bucket" owning_lib="owning_lib"/>
4943                 </retrieve>
4944             </actions>
4945         </permacrud>
4946         </class>
4947         <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">
4948                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4949                         <field name="id" reporter:datatype="id" />
4950                         <field name="item" reporter:datatype="link"/>
4951                         <field name="note" reporter:datatype="text" />
4952                 </fields>
4953                 <links>
4954                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4955                 </links>
4956         </class>
4957         <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">
4958                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4959                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4960                         <field name="btype" reporter:datatype="text"/>
4961                         <field name="id" reporter:datatype="id" />
4962                         <field name="name" reporter:datatype="text"/>
4963                         <field name="description" reporter:datatype="text"/>
4964                         <field name="owner" reporter:datatype="link"/>
4965                         <field name="pub" reporter:datatype="bool"/>
4966                         <field name="create_time" reporter:datatype="timestamp" />
4967                         <field name="owning_lib" reporter:datatype="org_unit" />
4968                 </fields>
4969                 <links>
4970                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4971                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4972                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4973                 </links>
4974                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4975                         <actions>
4976                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4977                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4978                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4979                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4980                         </actions>
4981                 </permacrud>
4982         </class>
4983         <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">
4984                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4985                         <field name="id" reporter:datatype="id" />
4986                         <field name="bucket" reporter:datatype="link"/>
4987                         <field name="note" reporter:datatype="text" />
4988                 </fields>
4989                 <links>
4990                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4991                 </links>
4992         </class>
4993         <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">
4994                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4995                         <field name="hold" reporter:datatype="link"/>
4996                         <field name="id" reporter:datatype="id" />
4997                         <field name="target_copy" reporter:datatype="link"/>
4998                         <field name="proximity" reporter:datatype="number"/>
4999                 </fields>
5000                 <links>
5001                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5002                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5003                 </links>
5004         </class>
5005         <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">
5006                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5007                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5008                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5009                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5010                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5011                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5012                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5013                 </fields>
5014                 <links>
5015                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5016                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5017                 </links>
5018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5019             <actions>
5020                 <create permission="CREATE_HOLD_NOTIFICATION">
5021                                         <context link="hold" jump="usr" field="home_ou" />
5022                                 </create>
5023                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5024                                         <context link="hold" jump="usr" field="home_ou" />
5025                                 </retrieve>
5026                 <update permission="CREATE_HOLD_NOTIFICATION">
5027                                         <context link="hold" jump="usr" field="home_ou" />
5028                                 </update>
5029                 <delete permission="CREATE_HOLD_NOTIFICATION">
5030                                         <context link="hold" jump="usr" field="home_ou" />
5031                                 </delete>
5032             </actions>
5033         </permacrud>
5034         </class>
5035         <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">
5036                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5037                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5038                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5039                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5040                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5041                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5042                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5043                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5044                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5045                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5046                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5047                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5048                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5049                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5050                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5051                 </fields>
5052                 <links>
5053                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5054                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5055                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5056                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5057                 </links>
5058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5059             <actions>
5060                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5061                 <retrieve/>
5062                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5063                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5064             </actions>
5065         </permacrud>
5066         </class>
5067         <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">
5068                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5069                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5070                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5071                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5072                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5073             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5074             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5075             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5076                 </fields>
5077                 <links>
5078                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5079                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5080                 </links>
5081         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5082             <actions>
5083                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5084                 <retrieve/>
5085                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5086                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5087             </actions>
5088         </permacrud>
5089         </class>
5090         <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">
5091                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5092                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5093             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5094             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5095                 </fields>
5096                 <links>
5097                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5098                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5099                 </links>
5100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5101             <actions>
5102                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5103                                         <context link="lgroup" field="owner" />
5104                 </create>
5105                 <retrieve/>
5106                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5107                                         <context link="lgroup" field="owner" />
5108                 </update>
5109                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5110                                         <context link="lgroup" field="owner" />
5111                 </delete>
5112             </actions>
5113         </permacrud>
5114         </class>
5115
5116     <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">
5117         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5118             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5119             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5120             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5121             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5122         </fields>
5123         <links>
5124             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5125             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5126         </links>
5127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5128             <actions>
5129                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5130                 <retrieve/>
5131                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5132                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5133             </actions>
5134         </permacrud>
5135     </class>
5136
5137         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5138                 <fields>
5139                         <field name="sre_id" oils_persist:virtual="true" />
5140                         <field name="location" oils_persist:virtual="true" />
5141                         <field name="owning_lib" oils_persist:virtual="true" />
5142                         <field name="basic_holdings" oils_persist:virtual="true" />
5143                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5144                         <field name="supplement_holdings" oils_persist:virtual="true" />
5145                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5146                         <field name="index_holdings" oils_persist:virtual="true" />
5147                         <field name="index_holdings_add" oils_persist:virtual="true" />
5148                         <field name="online" oils_persist:virtual="true" />
5149                         <field name="missing" oils_persist:virtual="true" />
5150                         <field name="incomplete" oils_persist:virtual="true" />
5151                 </fields>
5152         </class>
5153
5154         <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">
5155                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5156                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5157                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5158                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5159                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5160                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5161                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5162                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5163                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5164                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5165                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5166                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5167                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5168                 </fields>
5169                 <links>
5170                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5171                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5172                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5173                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5174                 </links>
5175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5176                         <actions>
5177                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5178                                 <retrieve/>
5179                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5180                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5181                         </actions>
5182                 </permacrud>
5183         </class>
5184
5185         <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">
5186                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5187                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5188                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5189                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5190                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5191                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5192                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5193                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5194                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5195                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5196                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5197                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5198                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5199                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5200                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5201                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5202                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5203                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5204                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5205                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5206                 </fields>
5207                 <links>
5208                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5209                 </links>
5210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5211                         <actions>
5212                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5213                                         <context link="subscription" field="owning_lib" />
5214                                 </create>
5215                                 <retrieve />
5216                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5217                                         <context link="subscription" field="owning_lib" />
5218                                 </update>
5219                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5220                                         <context link="subscription" field="owning_lib" />
5221                                 </delete>
5222                         </actions>
5223                 </permacrud>
5224         </class>
5225
5226         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5227                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5228                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5229                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5230                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5231                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5232                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5233                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5234                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5235                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5236                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5237                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5238                 </fields>
5239                 <links>
5240                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5241                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5242                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5243                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5244                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5245                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5246                 </links>
5247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5248                         <actions>
5249                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5250                                 <retrieve />
5251                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5252                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5253                         </actions>
5254                 </permacrud>
5255         </class>
5256
5257         <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">
5258                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5259                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5260                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5261                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5262                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5263                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5264                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5265                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5266                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5267                 </fields>
5268                 <links>
5269                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5270                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5271                 </links>
5272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5273                         <actions>
5274                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5275                     <context link="subscription" field="owning_lib"/>
5276                 </create>
5277                                 <retrieve />
5278                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5279                     <context link="subscription" field="owning_lib"/>
5280                 </update>
5281                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5282                     <context link="subscription" field="owning_lib"/>
5283                 </delete>
5284                         </actions>
5285                 </permacrud>
5286         </class>
5287
5288         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5289                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5290                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5291                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5292                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5293                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5294                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5295                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5296                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5297                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5298                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5299                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5300                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5301                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5302                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5303                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5304                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5305                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5306                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5307                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5308                 </fields>
5309                 <links>
5310                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5311                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5312                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5313                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5314                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5315                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5316                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5317                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5318                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5319                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5320                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5321                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5322                 </links>
5323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5324                         <actions>
5325                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5326                                 <retrieve />
5327                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5328                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5329                         </actions>
5330                 </permacrud>
5331         </class>
5332
5333         <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">
5334                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5335                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5336                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5337                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5338                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5339                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5340                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5341                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5342                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5343                 </fields>
5344                 <links>
5345                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5346                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5347                 </links>
5348                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5349                         <actions>
5350                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5351                                         <context link="distribution" field="holding_lib" />
5352                                 </create>
5353                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5354                                         <context link="distribution" field="holding_lib" />
5355                                 </retrieve>
5356                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5357                                         <context link="distribution" field="holding_lib" />
5358                                 </update>
5359                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5360                                         <context link="distribution" field="holding_lib" />
5361                                 </delete>
5362                         </actions>
5363                 </permacrud>
5364         </class>
5365
5366         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5367                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5368                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5369                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5370                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5371                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5372                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5373                 </fields>
5374                 <links>
5375                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5376                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5377                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5378                 </links>
5379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5380                         <actions>
5381                                 <create permission="ADMIN_SERIAL_STREAM">
5382                                         <context link="distribution" field="holding_lib" />
5383                                 </create>
5384                                 <retrieve />
5385                                 <update permission="ADMIN_SERIAL_STREAM">
5386                                         <context link="distribution" field="holding_lib" />
5387                                 </update>
5388                                 <delete permission="ADMIN_SERIAL_STREAM">
5389                                         <context link="distribution" field="holding_lib" />
5390                                 </delete>
5391                         </actions>
5392                 </permacrud>
5393         </class>
5394
5395         <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">
5396                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5397                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5398                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5399                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5400                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5401                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5402                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5403                 </fields>
5404                 <links>
5405                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5406                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5407                 </links>
5408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5409                         <actions>
5410                                 <create permission="ADMIN_SERIAL_STREAM">
5411                                         <context link="stream" jump="distribution" field="holding_lib" />
5412                                 </create>
5413                                 <retrieve permission="RECEIVE_SERIAL">
5414                                         <context link="stream" jump="distribution" field="holding_lib" />
5415                                 </retrieve>
5416                                 <update permission="ADMIN_SERIAL_STREAM">
5417                                         <context link="stream" jump="distribution" field="holding_lib" />
5418                                 </update>
5419                                 <delete permission="ADMIN_SERIAL_STREAM">
5420                                         <context link="stream" jump="distribution" field="holding_lib" />
5421                                 </delete>
5422                         </actions>
5423                 </permacrud>
5424         </class>
5425
5426         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5427                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5428                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5429                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5430                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5431                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5432                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5433                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5434                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5435                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5436                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5437                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5438                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5439                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5440                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5441                 </fields>
5442                 <links>
5443                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5444                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5445                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5446                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5447                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5448                 </links>
5449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5450                         <actions>
5451                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5452                                         <context link="subscription" field="owning_lib" />
5453                                 </create>
5454                                 <retrieve/>
5455                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5456                                         <context link="subscription" field="owning_lib" />
5457                                 </update>
5458                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5459                                         <context link="subscription" field="owning_lib" />
5460                                 </delete>
5461                         </actions>
5462                 </permacrud>
5463         </class>
5464
5465         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5466                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5467                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5468                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5469                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5470                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5471                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5472                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5473                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5474                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5475                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5476                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5477                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5478                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5479                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5480                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5481                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5482                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5483                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5484                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5485                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5486                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5487                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5488                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5489                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5490                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5491                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5492                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5493                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5494                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5495                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5496                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5497                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5498                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5499                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5500                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5501                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5502                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5503                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5504                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5505                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5506                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5507                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5508                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5509                 </fields>
5510                 <links>
5511                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5512                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5513                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5514                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5515                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5516                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5517                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5518                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5519                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5520                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5521                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5522                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5523                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5524                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5525                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5526                 </links>
5527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5528                         <actions>
5529                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5530                                 <retrieve/>
5531                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5532                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5533                         </actions>
5534                 </permacrud>
5535         </class>
5536
5537         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5538                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5539                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5540                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5541                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5542                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5543                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5544                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5545                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5546                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5547                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5548                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5549                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5550                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5551                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5552                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5553                 </fields>
5554                 <links>
5555                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5556                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5557                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5558                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5559                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5560                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5561                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5562                 </links>
5563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5564                         <actions>
5565                                 <create permission="ADMIN_SERIAL_ITEM">
5566                                         <context link="stream" jump="distribution" field="holding_lib" />
5567                                 </create>
5568                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5569                                         <context link="stream" jump="distribution" field="holding_lib" />
5570                                 </retrieve>
5571                                 <update permission="ADMIN_SERIAL_ITEM">
5572                                         <context link="stream" jump="distribution" field="holding_lib" />
5573                                 </update>
5574                                 <delete permission="ADMIN_SERIAL_ITEM">
5575                                         <context link="stream" jump="distribution" field="holding_lib" />
5576                                 </delete>
5577                         </actions>
5578                 </permacrud>
5579         </class>
5580
5581         <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">
5582                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5583                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5584                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5585                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5586                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5587                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5588                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5589                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5590                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5591                 </fields>
5592                 <links>
5593                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5594                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5595                 </links>
5596                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5597                         <actions>
5598                                 <create permission="ADMIN_SERIAL_ITEM">
5599                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5600                                 </create>
5601                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5602                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5603                                 </retrieve>
5604                                 <update permission="ADMIN_SERIAL_ITEM">
5605                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5606                                 </update>
5607                                 <delete permission="ADMIN_SERIAL_ITEM">
5608                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5609                                 </delete>
5610                         </actions>
5611                 </permacrud>
5612         </class>
5613         <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">
5614                 <fields>
5615                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5616                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5617                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5618                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5619                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5620                 </fields>
5621                 <links>
5622                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5623                 </links>
5624         </class>
5625         <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">
5626                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5627                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5628                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5629                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5630                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5631                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5632                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5633                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5634                 </fields>
5635                 <links>
5636                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5637                 </links>
5638         </class>
5639         <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">
5640                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5641                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5642                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5643                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5644                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5645                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5646                 </fields>
5647                 <links>
5648                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5649                 </links>
5650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5651                         <actions>
5652                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5653                                         <context link="distribution" field="holding_lib" />
5654                                 </create>
5655                                 <retrieve/>
5656                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5657                                         <context link="distribution" field="holding_lib" />
5658                                 </update>
5659                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5660                                         <context link="distribution" field="holding_lib" />
5661                                 </delete>
5662                         </actions>
5663                 </permacrud>
5664         </class>
5665
5666         <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">
5667                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5668                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5669                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5670                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5671                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5672                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5673                 </fields>
5674                 <links>
5675                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5676                 </links>
5677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5678                         <actions>
5679                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5680                                         <context link="distribution" field="holding_lib" />
5681                                 </create>
5682                                 <retrieve/>
5683                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5684                                         <context link="distribution" field="holding_lib" />
5685                                 </update>
5686                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5687                                         <context link="distribution" field="holding_lib" />
5688                                 </delete>
5689                         </actions>
5690                 </permacrud>
5691         </class>
5692
5693         <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">
5694                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5695                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5696                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5697                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5698                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5699                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5700                 </fields>
5701                 <links>
5702                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5703                 </links>
5704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5705                         <actions>
5706                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5707                                         <context link="distribution" field="holding_lib" />
5708                                 </create>
5709                                 <retrieve/>
5710                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5711                                         <context link="distribution" field="holding_lib" />
5712                                 </update>
5713                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5714                                         <context link="distribution" field="holding_lib" />
5715                                 </delete>
5716                         </actions>
5717                 </permacrud>
5718         </class>
5719
5720         <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">
5721                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5722                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5723                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5724                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5725                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5726                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5727                 </fields>
5728                 <links>
5729                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5730                 </links>
5731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5732                         <actions>
5733                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5734                                 <retrieve/>
5735                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5736                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5737                         </actions>
5738                 </permacrud>
5739         </class>
5740
5741         <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">
5742                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5743                         <field name="id" reporter:datatype="id" />
5744                         <field name="owning_copy" reporter:datatype="link"/>
5745                         <field name="stat_cat" reporter:datatype="link"/>
5746                         <field name="stat_cat_entry" reporter:datatype="link"/>
5747                 </fields>
5748                 <links>
5749                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5750                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5751                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5752                 </links>
5753                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5754                         <actions>
5755                                 <retrieve/>
5756                         </actions>
5757                 </permacrud>
5758         </class>
5759         <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">
5760                 <fields oils_persist:primary="code">
5761                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5762                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5763                 </fields>
5764                 <links/>
5765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5766             <actions>
5767                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5768                 <retrieve/>
5769                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5770                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5771             </actions>
5772         </permacrud>
5773         </class>
5774         <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">
5775                 <fields oils_persist:primary="code">
5776                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5777                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5778                 </fields>
5779                 <links/>
5780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5781             <actions>
5782                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5783                 <retrieve/>
5784                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5785                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5786             </actions>
5787         </permacrud>
5788         </class>
5789         <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">
5790                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5791                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5792                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5793                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5794                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5795                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5796                 </fields>
5797                 <links>
5798             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5799         </links>
5800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5801             <actions>
5802                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5803                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5804                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5805                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5806             </actions>
5807         </permacrud>
5808         </class>
5809         <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">
5810                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5811                         <field name="id" reporter:datatype="id" />
5812                         <field name="name" reporter:datatype="text"/>
5813                 </fields>
5814                 <links/>
5815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5816             <actions>
5817                 <create permission="CREATE_LASSO" global_required="true"/>
5818                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5819                 <update permission="UPDATE_LASSO" global_required="true"/>
5820                 <delete permission="DELETE_LASSO" global_required="true"/>
5821             </actions>
5822         </permacrud>
5823         </class>
5824         <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">
5825                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5826                         <field name="id" reporter:datatype="id" />
5827                         <field name="lasso" reporter:datatype="link"/>
5828                         <field name="org_unit" reporter:datatype="org_unit"/>
5829                 </fields>
5830                 <links>
5831                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5832                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5833                 </links>
5834         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5835             <actions>
5836                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5837                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5838                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5839                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5840             </actions>
5841         </permacrud>
5842         </class>
5843         <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">
5844                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5845                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5846                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5847                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5848                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5849                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5850                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5851                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5852                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5853                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5854                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5855                 </fields>
5856                 <links>
5857                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5858                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5859                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5860                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5861                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5862                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5863                 </links>
5864         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5865             <actions>
5866                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5867                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5868                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5869                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5870             </actions>
5871         </permacrud>
5872         </class>
5873         <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">
5874                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5875                         <field name="id" reporter:datatype="id" />
5876                         <field name="from_org" reporter:datatype="org_unit"/>
5877                         <field name="to_org" reporter:datatype="org_unit"/>
5878                         <field name="prox" reporter:datatype="int" />
5879                 </fields>
5880                 <links>
5881                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5882                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5883                 </links>
5884         </class>
5885         <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">
5886                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5887                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5888                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5889                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5890                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5891                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5892                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5893                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5894                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5895                 </fields>
5896                 <links/>
5897         </class>
5898         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5899                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5900                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5901                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5902                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5903                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5904                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5905                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5906                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5907                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5908                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5909                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5910                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5911                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5912                 </fields>
5913                 <links>
5914                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5915                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5916                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5917                 </links>
5918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5919             <actions>
5920                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5921                 <retrieve/>
5922                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5923                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5924             </actions>
5925         </permacrud>
5926         </class>
5927         <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">
5928                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5929                         <field name="address_type"  reporter:datatype="text"/>
5930                         <field name="city"  reporter:datatype="text"/>
5931                         <field name="country"  reporter:datatype="text"/>
5932                         <field name="county"  reporter:datatype="text"/>
5933                         <field name="id" reporter:datatype="id" />
5934                         <field name="org_unit" reporter:datatype="org_unit"/>
5935                         <field name="post_code"  reporter:datatype="text"/>
5936                         <field name="state"  reporter:datatype="text"/>
5937                         <field name="street1"  reporter:datatype="text"/>
5938                         <field name="street2"  reporter:datatype="text"/>
5939                         <field name="valid" reporter:datatype="bool"/>
5940                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5941                 </fields>
5942                 <links>
5943                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5944                 </links>
5945         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5946             <actions>
5947                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5948                 <retrieve/>
5949                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5950                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5951             </actions>
5952         </permacrud>
5953         </class>
5954         <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">
5955                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5956                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5957                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5958                         <field name="query_text" reporter:datatype="text"/>
5959                 </fields>
5960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5961             <actions>
5962                 <retrieve/>
5963             </actions>
5964         </permacrud>
5965         </class>
5966
5967         <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">
5968                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5969                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5970                         <field name="owner" reporter:datatype="org_unit"/>
5971                         <field name="code" reporter:datatype="text"/>
5972                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5973                         <field name="create_date" reporter:datatype="timestamp"/>
5974                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5975                 </fields>
5976                 <links>
5977                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5978                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5979                 </links>
5980         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5981             <actions>
5982                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5983                 <retrieve/>
5984                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5985                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5986             </actions>
5987         </permacrud>
5988         </class>
5989         <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">
5990                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5991                         <field name="id" reporter:datatype="id"/>
5992                         <field name="grp" reporter:datatype="link"/>
5993                         <field name="pos" reporter:datatype="int"/>
5994                         <field name="query" reporter:datatype="link"/>
5995                 </fields>
5996                 <links>
5997                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5998                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5999                 </links>
6000         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6001             <actions>
6002                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6003                     <context link="grp" field="owner"/>
6004                 </create>
6005                 <retrieve/>
6006                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6007                     <context link="grp" field="owner"/>
6008                 </update>
6009                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6010                     <context link="grp" field="owner"/>
6011                 </delete>
6012             </actions>
6013         </permacrud>
6014         </class>
6015
6016         <!-- A note: Please update alhr and ahopl when updating ahr -->
6017         <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">
6018                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6019                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6020                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6021                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6022                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6023                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6024                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6025                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6026                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6027                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6028                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6029                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6030                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6031                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6032                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6033                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6034                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6035                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6036                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6037                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6038                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6039                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6040                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6041                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6042                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6043                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6044                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6045                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6046                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6047                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6048                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6049                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6050                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6051                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6052                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6053                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6054                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6055                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6056                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6057                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6058                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6059                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6060                 </fields>
6061                 <links>
6062                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6063                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6064                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6065                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6066                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6067                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6068                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6069                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6070                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6071                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6072                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6073                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6074                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6075                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6076                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6077                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6078                 </links>
6079                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6080                         <actions>
6081                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6082                         </actions>
6083                 </permacrud>
6084         </class>
6085         <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">
6086                 <oils_persist:source_definition><![CDATA[
6087                 SELECT
6088                         ahr.*,
6089                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6090                                 copy_location_order_position,
6091                         CASE WHEN au.alias IS NOT NULL THEN
6092                                 au.alias
6093                         ELSE
6094                                 au.first_given_name
6095                         END AS usr_alias_or_first_given_name,
6096                         au.first_given_name AS usr_first_given_name,
6097                         au.second_given_name AS usr_second_given_name,
6098                         au.family_name AS usr_family_name,
6099                         au.prefix AS usr_prefix,
6100                         au.suffix AS usr_suffix,
6101                         au.alias AS usr_alias,
6102                         CASE WHEN au.alias IS NOT NULL THEN
6103                                 au.alias
6104                         ELSE
6105                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6106                                         COALESCE(au.family_name, ''),
6107                                         COALESCE(au.suffix, ''),
6108                                         ', ',
6109                                         COALESCE(au.prefix, ''),
6110                                         COALESCE(au.first_given_name, ''),
6111                                         COALESCE(au.second_given_name, '')
6112                                 ], ' '), E'\\s+,', ',')
6113                         END AS usr_alias_or_display_name,
6114                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6115                                 COALESCE(au.family_name, ''),
6116                                 COALESCE(au.suffix, ''),
6117                                 ', ',
6118                                 COALESCE(au.prefix, ''),
6119                                 COALESCE(au.first_given_name, ''),
6120                                 COALESCE(au.second_given_name, '')
6121                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6122                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6123                                 AS call_number_label,
6124                         siss.label AS issuance_label,
6125                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6126                         ahcm_1.copy_count AS potential_copies
6127                 FROM action.hold_request ahr
6128                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6129                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6130                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6131                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6132                 JOIN actor.usr au ON (au.id = ahr.usr)
6133                 JOIN (
6134                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6135                         FROM asset.copy_location
6136                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6137                 LEFT JOIN actor.usr_standing_penalty ausp 
6138                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6139                 LEFT JOIN config.standing_penalty csp
6140                         ON (
6141                                 csp.id = ausp.standing_penalty AND 
6142                                 csp.block_list LIKE '%CAPTURE%' AND (
6143                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6144                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6145                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6146                                         )
6147                                 )
6148                         )
6149                 JOIN (
6150                         SELECT COUNT(target_copy) AS copy_count, hold
6151                         FROM action.hold_copy_map
6152                         GROUP BY 2
6153                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6154                 LEFT JOIN serial.issuance siss
6155                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6156                 LEFT JOIN asset.copy_location_order acplo
6157                         ON (acp.location = acplo.location AND
6158                                 acp.circ_lib = acplo.org)
6159                 WHERE
6160                         ahr.capture_time IS NULL AND
6161                         ahr.cancel_time IS NULL AND
6162                         csp.id IS NULL AND
6163                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6164                         acp.status IN (0,7)
6165                 ]]></oils_persist:source_definition>
6166                 <fields oils_persist:primary="id">
6167                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6168                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6169                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6170                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6171                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6172                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6173                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6174                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6175                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6176                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6177                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6178                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6179                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6180                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6181                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6182                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6183                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6184                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6185                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6186                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6187                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6188                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6189                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6190                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6191                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6192                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6193                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6194                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6195                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6196                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6197                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6198                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6199                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6200                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6201                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6202                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6203                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6204                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6205                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6206                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6207                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6208                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6209                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6210                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6211                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6212                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6213                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6214                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6215                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6216                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6217                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6218                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6219                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6220                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6221                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6222                 </fields>
6223                 <links>
6224                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6225                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6226                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6227                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6228                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6229                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6230                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6231                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6232                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6233                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6234                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6235                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6236                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6237                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6238                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6239                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6240                 </links>
6241                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6242                         <actions>
6243                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6244                         </actions>
6245                 </permacrud>
6246         </class>
6247         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6248                 <oils_persist:source_definition>
6249                         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)
6250                 </oils_persist:source_definition>
6251                 <fields oils_persist:primary="id">
6252                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6253                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6254                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6255                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6256                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6257                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6258                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6259                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6260                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6261                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6262                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6263                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6264                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6265                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6266                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6267                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6268                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6269                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6270                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6271                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6272                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6273                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6274                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6275                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6276                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6277                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6278                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6279                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6280                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6281                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6282                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6283                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6284                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6285                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6286                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6287                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6288                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6289                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6290                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6291                 </fields>
6292                 <links>
6293                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6294                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6295                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6296                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6297                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6298                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6299                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6300                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6301                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6302                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6303                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6304                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6305                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6306                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6307                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6308                 </links>
6309         </class>
6310
6311         <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">
6312                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6313                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6314                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6315                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6316                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6317                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6318                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6319                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6320                 </fields>
6321                 <links>
6322                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6323                 </links>
6324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6325                         <actions>
6326                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6327                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6328                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6329                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6330                         </actions>
6331                 </permacrud>
6332         </class>
6333         <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">
6334                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6335                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6336                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6337                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6338                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6339                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6340                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6341                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6342                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6343                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6344                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6345                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6346                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6347                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6348                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6349                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6350                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6351                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6352                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6353                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6354                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6355                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6356                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6357                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6358                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6359                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6360                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6361                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6362                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6363                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6364                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6365                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6366                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6367                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6368                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6369                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6370                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6371                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6372                 </fields>
6373                 <links>
6374                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6375                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6376                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6377                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6378                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6379                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6380                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6381                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6382                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6383                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6384                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6385                 </links>
6386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6387                         <actions>
6388                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6389                         </actions>
6390                 </permacrud>
6391         </class>
6392         <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">
6393                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6394                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6395                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6396                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6397                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6398                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6399                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6400                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6401                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6402                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6403                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6404                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6405                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6406                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6407                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6408                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6409                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6410                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6411                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6412                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6413                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6414                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6415                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6416                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6417                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6418                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6419                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6420                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6421                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6422                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6423                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6424                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6425                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6426                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6427                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6428                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6429                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6430                 </fields>
6431                 <links>
6432                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6433                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6434                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6435                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6436                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6437                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6438                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6439                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6440                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6441                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6442                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6443                 </links>
6444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6445                         <actions>
6446                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6447                         </actions>
6448                 </permacrud>
6449         </class>
6450
6451         <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">
6452                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6453                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6454                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6455                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6456                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6457                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6458                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6459                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6460                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6461                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6462                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6463                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6464                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6465                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6466                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6467                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6468                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6469                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6470                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6471                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6472                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6473                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6474                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6475                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6476                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6477                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6478                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6479                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6480                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6481                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6482                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6483                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6484                 </fields>
6485                 <links>
6486                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6487                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6488                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6489                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6490                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6491                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6492                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6493                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6494                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6495                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6496                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6497                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6498                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6499                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6500                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6501                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6502                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6503                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6504                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6505                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6506                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6507                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6508                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6509                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6510                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6511                 </links>
6512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6513             <actions>
6514                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6515                 <retrieve />
6516                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6517                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6518             </actions>
6519         </permacrud>
6520         </class>
6521         <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">
6522                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6523                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6524                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6525                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6526                 </fields>
6527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6528                         <actions>
6529                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6530                                 <retrieve/>
6531                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6532                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6533                         </actions>
6534                 </permacrud>
6535         </class>
6536         <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">
6537                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6538                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6539                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6540                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6541                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6542                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6543                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6544                 </fields>
6545                 <links>
6546                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6547                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6548                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6549                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6550                 </links>
6551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6552                         <actions>
6553                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6554                                 <retrieve/>
6555                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6556                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6557                         </actions>
6558                 </permacrud>
6559         </class>
6560         <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">
6561                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6562                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6563                         <field name="btype" reporter:datatype="text"/>
6564                         <field name="id" reporter:datatype="id" />
6565                         <field name="name"  reporter:datatype="text"/>
6566                         <field name="description" reporter:datatype="text"/>
6567                         <field name="owner" reporter:datatype="link"/>
6568                         <field name="pub" reporter:datatype="bool"/>
6569                         <field name="create_time" reporter:datatype="timestamp" />
6570                         <field name="owning_lib" reporter:datatype="org_unit" />
6571                 </fields>
6572                 <links>
6573                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6574                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6575                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6576                 </links>
6577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6578                         <actions>
6579                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6580                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6581                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6582                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6583                         </actions>
6584                 </permacrud>
6585         </class>
6586         <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">
6587                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6588                         <field name="id" reporter:datatype="id" />
6589                         <field name="bucket" reporter:datatype="link"/>
6590                         <field name="note" reporter:datatype="text" />
6591                 </fields>
6592                 <links>
6593                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6594                 </links>
6595         </class>
6596         <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">
6597                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6598                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6599                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6600                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6601                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6602                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6603                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6604                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6605                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6606                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6607                 </fields>
6608                 <links>
6609                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6610                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6611                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6612                 </links>
6613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6614                         <actions>
6615                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6616                         </actions>
6617                 </permacrud>
6618         </class>
6619         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6620                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6621                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6622                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6623                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6624                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6625                 </fields>
6626                 <links>
6627                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6628                 </links>
6629                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6630                         <actions>
6631                                 <retrieve permission="VIEW_USER">
6632                                         <context link="usr" field="home_ou" />
6633                                 </retrieve>
6634                         </actions>
6635                 </permacrud>
6636         </class>
6637     <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">
6638         <fields oils_persist:primary="field">
6639             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6640             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6641             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6642         </fields>
6643         <links/>
6644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6645             <actions>
6646                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6647                 <retrieve />
6648                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6649                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6650             </actions>
6651         </permacrud>
6652     </class>
6653         <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">
6654                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6655                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6656                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6657                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6658                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6659                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6660                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6661                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6662                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6663                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6664                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6665                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6666                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6667                 </fields>
6668                 <links>
6669                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6670                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6671                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6672                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6673                 </links>
6674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6675             <actions>
6676                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6677                 <retrieve />
6678                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6679                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6680             </actions>
6681         </permacrud>
6682         </class>
6683         <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">
6684                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6685                         <field name="field" reporter:datatype="link"/>
6686                         <field name="id" reporter:datatype="id" />
6687                         <field name="source" reporter:datatype="link"/>
6688                         <field name="value"  reporter:datatype="text"/>
6689                 </fields>
6690                 <links>
6691                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6692                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6693                 </links>
6694         </class>
6695         <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">
6696                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6697                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6698                         <field name="btype" reporter:datatype="text"/>
6699                         <field name="id" reporter:datatype="id" />
6700                         <field name="name"  reporter:datatype="text"/>
6701                         <field name="description" reporter:datatype="text"/>
6702                         <field name="owner" reporter:datatype="link"/>
6703                         <field name="pub" reporter:datatype="bool"/>
6704                         <field name="create_time" reporter:datatype="timestamp" />
6705                         <field name="owning_lib" reporter:datatype="org_unit" />
6706                 </fields>
6707                 <links>
6708                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6709                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6710                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6711                 </links>
6712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6713                         <actions>
6714                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6715                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6716                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6717                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6718                         </actions>
6719                 </permacrud>
6720         </class>
6721         <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">
6722                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6723                         <field name="id" reporter:datatype="id" />
6724                         <field name="bucket" reporter:datatype="link"/>
6725                         <field name="note" reporter:datatype="text" />
6726                 </fields>
6727                 <links>
6728                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6729                 </links>
6730         </class>
6731         <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">
6732                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6733                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6734                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6735                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6736                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6737                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6738                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6739                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6740                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6741                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6742                 </fields>
6743                 <links>
6744                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6745                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6746                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6747                 </links>
6748         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6749             <actions>
6750                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6751                     <context link="xact" jump="usr" field="home_ou"/>
6752                 </retrieve>
6753                         </actions>
6754                 </permacrud>
6755         </class>
6756         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6757                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6758                         <field name="id" reporter:datatype="id" />
6759                         <field name="ind1" />
6760                         <field name="ind2" />
6761                         <field name="record" />
6762                         <field name="subfield" />
6763                         <field name="tag" />
6764                         <field name="value" />
6765                 </fields>
6766                 <links>
6767                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6768                 </links>
6769         </class>
6770         <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">
6771                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6772                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6773                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6774                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6775                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6776                 </fields>
6777                 <links>
6778                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6779                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6780                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6781                 </links>
6782         </class>
6783         <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">
6784                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6785                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6786                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6787                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6788                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6789                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6790                 </fields>
6791                 <links>
6792                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6793                 </links>
6794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6795             <actions>
6796                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6797                 <retrieve/>
6798                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6799                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6800             </actions>
6801         </permacrud>
6802
6803         </class>
6804         <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">
6805                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6806                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6807                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6808                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6809                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6810                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6811                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6812                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6813                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6814                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6815                 </fields>
6816                 <links>
6817                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6818                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6819                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6820                 </links>
6821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6822             <actions>
6823                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6824                 <retrieve/>
6825                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6826                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6827             </actions>
6828         </permacrud>
6829         </class>
6830         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6831                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6832                         <field name="create_date" reporter:datatype="timestamp"/>
6833                         <field name="creator" reporter:datatype="link"/>
6834                         <field name="edit_date" reporter:datatype="timestamp"/>
6835                         <field name="editor" reporter:datatype="link"/>
6836                         <field name="id" reporter:datatype="id" />
6837                         <field name="pub" reporter:datatype="bool"/>
6838                         <field name="record" reporter:datatype="link"/>
6839                         <field name="value"  reporter:datatype="text"/>
6840                 </fields>
6841                 <links>
6842                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6843                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6844                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6845                 </links>
6846         </class>
6847         <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">
6848                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6849                         <field name="balance_owed" reporter:datatype="money" />
6850                         <field name="total_owed" reporter:datatype="money" />
6851                         <field name="total_paid" reporter:datatype="money" />
6852                         <field name="usr" reporter:datatype="link"/>
6853                 </fields>
6854                 <links>
6855                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6856                 </links>
6857         </class>
6858     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6859                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6860                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6861                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6862                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6863                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6864                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6865                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6866                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6867                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6868                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6869                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6870                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6871                 </fields>
6872                 <links>
6873                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6874                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6875                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6876                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6877                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6878                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6879                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6880                 </links>
6881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6882             <actions>
6883                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
6884             </actions>
6885         </permacrud>
6886         </class>
6887         <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">
6888                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6889                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6890                         <field name="quality" reporter:datatype="int" />
6891                         <field name="source" reporter:datatype="text"/>
6892                         <field name="transcendant" reporter:datatype="bool"/>
6893                         <field name="can_have_copies" reporter:datatype="bool"/>
6894                 </fields>
6895                 <links/>
6896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6897             <actions>
6898                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6899                 <retrieve/>
6900                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6901                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6902             </actions>
6903         </permacrud>
6904         </class>
6905         <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">
6906                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6907                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6908                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6909                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6910                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6911                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6912                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6913                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6914                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6915                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6916                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6917                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6918                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6919                 </fields>
6920                 <links>
6921                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6922                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6923                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6924                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6925                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6926                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6927                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6928                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6929                 </links>
6930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6931                         <actions>
6932                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6933                                         <context link="usr" field="home_ou" />
6934                                 </retrieve>
6935                         </actions>
6936                 </permacrud>
6937         </class>
6938         <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">
6939                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6940                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6941                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6942                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6943                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6944                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" 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="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6950                 </links>
6951         </class>
6952         <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">
6953                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6954                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6955                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6956                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6957                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6958                 </fields>
6959                 <links>
6960                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6961                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6962                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6963                 </links>
6964         </class>
6965         <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">
6966                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6967                         <field name="bucket" reporter:datatype="link"/>
6968                         <field name="id" reporter:datatype="id" />
6969                         <field name="target_user" reporter:datatype="link"/>
6970                         <field name="create_time" reporter:datatype="timestamp" />
6971                         <field name="pos" reporter:datatype="int" />
6972                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6973                 </fields>
6974                 <links>
6975                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6976                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6977             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6978                 </links>
6979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6980                         <actions>
6981                                 <retrieve permission="ADMIN_USER_BUCKET">
6982                     <context link="bucket" owning_lib="owning_lib"/>
6983                 </retrieve>
6984             </actions>
6985         </permacrud>
6986         </class>
6987         <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">
6988                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6989                         <field name="id" reporter:datatype="id" />
6990                         <field name="item" reporter:datatype="link"/>
6991                         <field name="note" reporter:datatype="text" />
6992                 </fields>
6993                 <links>
6994                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6995                 </links>
6996         </class>
6997         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6998                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6999                         <field name="balance_owed" reporter:datatype="money" />
7000                         <field name="total_owed" reporter:datatype="money" />
7001                         <field name="total_paid" reporter:datatype="money" />
7002                         <field name="usr" reporter:datatype="link"/>
7003                 </fields>
7004                 <links>
7005                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7006                 </links>
7007         </class>
7008         <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">
7009                 <fields oils_persist:primary="code" oils_persist:sequence="">
7010                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7011                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7012                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7013                 </fields>
7014                 <links/>
7015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7016             <actions>
7017                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7018                 <retrieve/>
7019                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7020                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7021             </actions>
7022         </permacrud>
7023         </class>
7024         <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">
7025                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7026                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7027                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7028                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7029                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7030                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7031                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7032                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7033                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7034                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7035                 </fields>
7036                 <links>
7037                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7038                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7039                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7040                 </links>
7041         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7042             <actions>
7043                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7044                     <context link="xact" jump="usr" field="home_ou"/>
7045                 </retrieve>
7046                         </actions>
7047                 </permacrud>
7048         </class>
7049         <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">
7050                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7051                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7052                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7053                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7054                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7055                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7056                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7057                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7058                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7059                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7060                 </fields>
7061                 <links>
7062                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7063                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7064                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7065                 </links>
7066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7067             <actions>
7068                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7069                     <context link="xact" jump="usr" field="home_ou"/>
7070                 </retrieve>
7071                         </actions>
7072                 </permacrud>
7073         </class>
7074         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7075                 <fields oils_persist:primary="id" oils_persist:sequence="">
7076                         <field name="checkin_lib" reporter:datatype="link"/>
7077                         <field name="checkin_staff" reporter:datatype="link"/>
7078                         <field name="checkin_time" reporter:datatype="timestamp"/>
7079                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7080                         <field name="circ_staff" reporter:datatype="link"/>
7081                         <field name="desk_renewal" reporter:datatype="bool"/>
7082                         <field name="due_date" reporter:datatype="timestamp"/>
7083                         <field name="duration" reporter:datatype="interval"/>
7084                         <field name="duration_rule" reporter:datatype="link"/>
7085                         <field name="fine_interval" reporter:datatype="interval"/>
7086                         <field name="id" reporter:datatype="id" />
7087                         <field name="max_fine" reporter:datatype="money" />
7088                         <field name="max_fine_rule" reporter:datatype="link"/>
7089                         <field name="opac_renewal" reporter:datatype="bool"/>
7090                         <field name="phone_renewal" reporter:datatype="bool"/>
7091                         <field name="recurring_fine" reporter:datatype="money" />
7092                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7093                         <field name="renewal_remaining" reporter:datatype="int" />
7094             <field name="grace_period" reporter:datatype="interval" />
7095                         <field name="stop_fines" reporter:datatype="text"/>
7096                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7097                         <field name="target_copy" reporter:datatype="link"/>
7098                         <field name="usr" reporter:datatype="link"/>
7099                         <field name="xact_finish" reporter:datatype="timestamp" />
7100                         <field name="xact_start" reporter:datatype="timestamp" />
7101                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7102                 </fields>
7103                 <links>
7104                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7105                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7106                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7107                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7108                 </links>
7109         </class>
7110         <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">
7111                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7112                         <field name="field" reporter:datatype="link"/>
7113                         <field name="id" reporter:datatype="id" />
7114                         <field name="source" reporter:datatype="link"/>
7115                         <field name="value" reporter:datatype="text"/>
7116                 </fields>
7117                 <links>
7118                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7119                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7120                 </links>
7121         </class>
7122         <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">
7123                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7124                         <field name="high" reporter:datatype="money" />
7125                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7126                         <field name="low" reporter:datatype="money" />
7127                         <field name="name" reporter:datatype="text"/>
7128                         <field name="normal" reporter:datatype="money" />
7129                         <field name="recurrence_interval" reporter:datatype="interval"/>
7130             <field name="grace_period" reporter:datatype="interval" />
7131                 </fields>
7132                 <links/>
7133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7134             <actions>
7135                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7136                 <retrieve/>
7137                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7138                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7139             </actions>
7140         </permacrud>
7141         </class>
7142         <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">
7143                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7144                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7145                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7146                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7147                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7148                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7149                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7150                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7151                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7152                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7153                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7154                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7155                 </fields>
7156                 <links>
7157                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7158                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7159                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7160                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7161                 </links>
7162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7163             <actions>
7164                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7165                     <context link="xact" jump="usr" field="home_ou"/>
7166                 </retrieve>
7167                         </actions>
7168                 </permacrud>
7169         </class>
7170         <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">
7171                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7172                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7173                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7174                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7175                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7176                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
7177                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7178                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7179                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7180                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7181                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7182                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7183                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7184                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7185                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7186                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7187                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7188                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7189                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7190                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7191                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7192                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7193                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7194                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7195                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7196                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7197                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7198                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7199                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7200                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7201                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7202                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7203                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7204                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7205                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7206                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7210                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7211                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7212                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7213                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7214                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7215                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7216                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7217                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7218                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7219                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7220                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7221                 </fields>
7222                 <links>
7223                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7224                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7225                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7226                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7227                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7228                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7229                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7230                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7231                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7232                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7233                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7234                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7235                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7236                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7237                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7238                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7239                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7240                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7241                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7242                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7243                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7244                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7245                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7246                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7247                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7248                 </links>
7249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7250             <actions>
7251                 <create permission="CREATE_COPY">
7252                     <context link="call_number" field="owning_lib"/>
7253                 </create>
7254                 <retrieve/>
7255                 <update permission="UPDATE_COPY">
7256                     <context link="call_number" field="owning_lib"/>
7257                 </update>
7258                 <delete permission="DELETE_COPY">
7259                     <context link="call_number" field="owning_lib"/>
7260                 </delete>
7261             </actions>
7262         </permacrud>
7263         </class>
7264
7265         <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">
7266                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7267                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7268                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7269                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7270                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7271                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7272                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7273                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7274                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7275                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7276                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7277                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7278                 </fields>
7279                 <links>
7280                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7281                 </links>
7282         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7283             <actions>
7284                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7285                 <retrieve/>
7286                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7287                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7288             </actions>
7289         </permacrud>
7290         </class>
7291
7292         <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">
7293                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7294                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7295                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7296                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7297                 </fields>
7298                 <links>
7299                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7300                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7301                 </links>
7302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7303             <actions>
7304                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7305                 <retrieve/>
7306                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7307                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7308             </actions>
7309         </permacrud>
7310         </class>
7311
7312         <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">
7313                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7314                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7315                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7316                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7317                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7318                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7319                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7320                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7321                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7322                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7323                 </fields>
7324                 <links>
7325                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7326                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7327                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7328                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7329                 </links>
7330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7331             <actions>
7332                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7333                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7334                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7335                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7336             </actions>
7337         </permacrud>
7338         </class>
7339
7340         <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">
7341                 <fields oils_persist:primary="id">
7342                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7343                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7344                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7345                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7346                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7347                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7348                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7349                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7350                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7351                 </fields>
7352                 <links>
7353                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7354                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7355                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7356                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7357                 </links>
7358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7359             <actions>
7360                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7361                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7362                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7363                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7364             </actions>
7365         </permacrud>
7366         </class>
7367
7368         <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">
7369                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7370                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7371                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7372                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7373                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7374                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7375                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7376                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7377                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7378                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7379                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7380                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7381                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7382                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7383                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7384                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7385                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7386                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7387                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7388                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7389                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7390                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7391                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7392                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7393                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7394                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7395                 </fields>
7396                 <links>
7397                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7398                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7399                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7400                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7401                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7402                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7403                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7404                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7405                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7406                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7407                 </links>
7408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7409                         <actions>
7410                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7411                                 <retrieve />
7412                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7413                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7414                         </actions>
7415                 </permacrud>
7416         </class>
7417
7418         <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">
7419                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7420                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7421                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7422                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7423                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7424                 </fields>
7425                 <links/>
7426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7427             <actions>
7428                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7429                 <retrieve/>
7430                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7431                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7432             </actions>
7433         </permacrud>
7434         </class>
7435         <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">
7436                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7437                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7438                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7439                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7440                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7441                 </fields>
7442                 <links/>
7443         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7444             <actions>
7445                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7446                 <retrieve/>
7447                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7448                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7449             </actions>
7450         </permacrud>
7451         </class>
7452         <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">
7453                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7454                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7455                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7456                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7457                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7458                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7459                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7460                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7461                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7462                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7463                 </fields>
7464                 <links>
7465                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7466                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7467                 </links>
7468         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7469             <actions>
7470                 <create permission="CREATE_PERM" global_required="true"/>
7471                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7472                 <update permission="UPDATE_PERM" global_required="true"/>
7473                 <delete permission="DELETE_PERM" global_required="true"/>
7474             </actions>
7475         </permacrud>
7476         </class>
7477         <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">
7478                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7479                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7480                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7481                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7482                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7483                 </fields>
7484                 <links>
7485                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7486                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7487                 </links>
7488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7489             <actions>
7490                 <create permission="ADMIN_SURVEY">
7491                     <context link="question" jump="survey" field="owner"/>
7492                 </create>
7493                 <retrieve/>
7494                 <update permission="ADMIN_SURVEY">
7495                     <context link="question" jump="survey" field="owner"/>
7496                 </update>
7497                 <delete permission="ADMIN_SURVEY">
7498                     <context link="question" jump="survey" field="owner"/>
7499                 </delete>
7500             </actions>
7501         </permacrud>
7502         </class>
7503         <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">
7504                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7505                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7506                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7507                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7508                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7509                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7510                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7511                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7512                 </fields>
7513                 <links>
7514                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7515                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7516                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7517                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7518                 </links>
7519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7520                         <actions>
7521                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7522                         </actions>
7523                 </permacrud>
7524         </class>
7525         <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">
7526                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7527                         <field name="balance_owed" reporter:datatype="money" />
7528                         <field name="total_owed" reporter:datatype="money" />
7529                         <field name="total_paid" reporter:datatype="money" />
7530                         <field name="usr" reporter:datatype="link"/>
7531                 </fields>
7532                 <links>
7533                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7534                 </links>
7535         </class>
7536         <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">
7537                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7538                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7539                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7540                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7541                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7542                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7543                 </fields>
7544                 <links>
7545                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7546                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7547                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7548                 </links>
7549         </class>
7550         <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">
7551                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7552                         <field name="field" reporter:datatype="link"/>
7553                         <field name="id" reporter:datatype="id" />
7554                         <field name="source" reporter:datatype="link"/>
7555                         <field name="value" reporter:datatype="text"/>
7556                 </fields>
7557                 <links>
7558                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7559                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7560                 </links>
7561         </class>
7562         <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">
7563                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7564                         <field name="field" reporter:datatype="link"/>
7565                         <field name="id" reporter:datatype="id" />
7566                         <field name="source" reporter:datatype="link"/>
7567                         <field name="value" reporter:datatype="text"/>
7568                 </fields>
7569                 <links>
7570                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7571                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7572                 </links>
7573         </class>
7574         <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">
7575                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7576                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7577                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7578                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7579                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7580                 </fields>
7581                 <links>
7582                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7583                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7584                 </links>
7585         </class>
7586         <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">
7587                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7588                         <field name="depth" reporter:datatype="int" />
7589                         <field name="grantable" reporter:datatype="bool"/>
7590                         <field name="grp" reporter:datatype="link"/>
7591                         <field name="id" reporter:datatype="id" />
7592                         <field name="perm" reporter:datatype="link"/>
7593                 </fields>
7594                 <links>
7595                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7596                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7597                 </links>
7598         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7599             <actions>
7600                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7601                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7602                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7603                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7604             </actions>
7605         </permacrud>
7606         </class>
7607         <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">
7608                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7609                         <field name="items" oils_persist:virtual="true" />
7610                         <field name="btype" reporter:datatype="text"/>
7611                         <field name="id" reporter:datatype="id" />
7612                         <field name="name" reporter:datatype="text"/>
7613                         <field name="description" reporter:datatype="text"/>
7614                         <field name="owner" reporter:datatype="link"/>
7615                         <field name="pub" reporter:datatype="bool"/>
7616                         <field name="create_time" reporter:datatype="timestamp" />
7617                         <field name="owning_lib" reporter:datatype="org_unit" />
7618                 </fields>
7619                 <links>
7620                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7621                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7622                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7623                 </links>
7624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7625                         <actions>
7626                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7627                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7628                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7629                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7630                         </actions>
7631                 </permacrud>
7632         </class>
7633         <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">
7634                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7635                         <field name="id" reporter:datatype="id" />
7636                         <field name="bucket" reporter:datatype="link"/>
7637                         <field name="note" reporter:datatype="text" />
7638                 </fields>
7639                 <links>
7640                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7641                 </links>
7642         </class>
7643         <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">
7644                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7645                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7646                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7647                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7648                 </fields>
7649                 <links>
7650                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7651                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7652                 </links>
7653         </class>
7654         <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">
7655                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7656                         <field name="depth" reporter:datatype="int"/>
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                 </fields>
7662                 <links>
7663                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7664                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7665                 </links>
7666         </class>
7667         <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">
7668                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7669                         <field name="object_id" reporter:datatype="text"/>
7670                         <field name="grantable" reporter:datatype="bool"/>
7671                         <field name="id" reporter:datatype="id" />
7672                         <field name="perm" reporter:datatype="link"/>
7673                         <field name="usr" reporter:datatype="link"/>
7674                         <field name="object_type" reporter:datatype="text"/>
7675                 </fields>
7676                 <links>
7677                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7678                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7679                 </links>
7680         </class>
7681         <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">
7682                 <fields oils_persist:primary="id" oils_persist:sequence="">
7683                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7684                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7685                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7686                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7687                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7688                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7689                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7690                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7691                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7692                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7693                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7694                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7695                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7696                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7697                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7698                 </fields>
7699                 <links>
7700                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7701                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7702                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7703                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7704                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7705                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7706                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7707                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7708                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7709                 </links>
7710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7711             <actions>
7712                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7713                     <context link="xact" jump="usr" field="home_ou"/>
7714                 </retrieve>
7715                         </actions>
7716                 </permacrud>
7717         </class>
7718         <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">
7719                 <fields oils_persist:primary="id" oils_persist:sequence="">
7720                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7721                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7722                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7723                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7724                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7725                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7726                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7727                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7728                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7729                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7730                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7731                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7732                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7733                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7734                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7735                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7736                 </fields>
7737                 <links>
7738                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7739                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7740                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7741                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7742                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7743                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7744                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7745                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7746                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7747                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7748                 </links>
7749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7750                         <actions>
7751                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7752                                         <context link="xact" jump="usr" field="home_ou"/>
7753                                 </retrieve>
7754                         </actions>
7755                 </permacrud>
7756         </class>
7757         <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">
7758                 <fields oils_persist:primary="id" oils_persist:sequence="">
7759                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7760                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7761                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7762                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7763                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7764                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7765                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7766                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7767                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7768                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7769                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7770                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7771                 </fields>
7772                 <links>
7773                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7774                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7775                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7776                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7777                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7778                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7779                 </links>
7780         </class>
7781         <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">
7782                 <fields oils_persist:primary="id" oils_persist:sequence="">
7783                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7784                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7785                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7786                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7787                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7788                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7789                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7790                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7791                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7792                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7793                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7794                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7795                 </fields>
7796                 <links>
7797                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7798                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7799                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7800                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7801                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7802                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7803                 </links>
7804         </class>
7805         <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">
7806                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7807                         <field name="bucket" reporter:datatype="link"/>
7808                         <field name="id" reporter:datatype="id" />
7809                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7810                         <field name="create_time" reporter:datatype="timestamp" />
7811                         <field name="pos" reporter:datatype="int" />
7812                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7813                 </fields>
7814                 <links>
7815                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7816                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7817             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7818                 </links>
7819                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7820                         <actions>
7821                                 <retrieve permission="ADMIN_COPY_BUCKET">
7822                     <context link="bucket" owning_lib="owning_lib"/>
7823                 </retrieve>
7824             </actions>
7825         </permacrud>
7826         </class>
7827         <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">
7828                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7829                         <field name="id" reporter:datatype="id" />
7830                         <field name="item" reporter:datatype="link"/>
7831                         <field name="note" reporter:datatype="text" />
7832                 </fields>
7833                 <links>
7834                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7835                 </links>
7836         </class>
7837         <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">
7838                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7839                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7840                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7841                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7842                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7843                 </fields>
7844                 <links>
7845                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7846                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7847                 </links>
7848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7849                         <actions>
7850                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7851                         </actions>
7852                 </permacrud>
7853         </class>
7854     <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">
7855         <fields oils_persist:primary="field">
7856             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7857             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7858             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7859         </fields>
7860         <links/>
7861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7862             <actions>
7863                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7864                 <retrieve />
7865                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7866                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7867             </actions>
7868         </permacrud>
7869     </class>
7870         <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">
7871                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7872                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7873                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7874                 </fields>
7875                 <links/>
7876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7877             <actions>
7878                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7879                 <retrieve/>
7880                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7881                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7882             </actions>
7883         </permacrud>
7884         </class>
7885
7886
7887         <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">
7888                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7889                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7890                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7891                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7892                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7893                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7894                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7895                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7896                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7897                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7898                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7899                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7900                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7901                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7902                 </fields>
7903                 <links>
7904                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7905                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7906                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7907                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7908                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7909                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7910                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7911                 </links>
7912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7913             <actions>
7914                 <create permission="TRANSIT_COPY">
7915                     <context link="target_copy" field="owner"/>
7916                 </create>
7917                 <retrieve/>
7918                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7919                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7920             </actions>
7921         </permacrud>
7922         </class>
7923         <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">
7924                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7925                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7926                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7927                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7928                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7929                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7930                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7931                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7932                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7933                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7934                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7935                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7936                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7937                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7938                 </fields>
7939                 <links>
7940                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7941                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7942                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7943                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7944                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7945                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7946                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7947                 </links>
7948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7949             <actions>
7950                 <create permission="TRANSIT_COPY" context_field="owner">
7951                     <context link="target_copy" field="circ_lib"/>
7952                 </create>
7953                 <retrieve/>
7954                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7955                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7956             </actions>
7957         </permacrud>
7958         </class>
7959         <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">
7960                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7961                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7962                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7963                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7964                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7965                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7966                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7967                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7968                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7969                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7970                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7971                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7972                 </fields>
7973                 <links>
7974                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7975                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7976                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7977                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7978                 </links>
7979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7980             <actions>
7981                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7982                     <context link="xact" jump="usr" field="home_ou"/>
7983                 </retrieve>
7984                         </actions>
7985                 </permacrud>
7986         </class>
7987         <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">
7988                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7989                         <field name="grp" />
7990                         <field name="id" reporter:datatype="id" />
7991                         <field name="usr" />
7992                 </fields>
7993                 <links>
7994                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7995                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7996                 </links>
7997         </class>
7998         <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">
7999                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8000                         <field name="id" reporter:datatype="id" />
8001                         <field name="fq_field" reporter:datatype="text"/>
8002                         <field name="identity_value" reporter:datatype="text"/>
8003                         <field name="translation" reporter:datatype="text"/>
8004                         <field name="string" reporter:datatype="text"/>
8005                 </fields>
8006                 <links>
8007                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8008                 </links>
8009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8010             <actions>
8011                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8012                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8013                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8014                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8015             </actions>
8016         </permacrud>
8017         </class>
8018         <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">
8019                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8020                         <field name="id" reporter:datatype="id" />
8021                         <field name="fm_class" reporter:datatype="text"/>
8022                         <field name="field" reporter:datatype="text"/>
8023                         <field name="owner" reporter:datatype="org_unit"/>
8024                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8025                 </fields>
8026                 <links>
8027                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8028                 </links>
8029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8030             <actions>
8031                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8032                 <retrieve/>
8033                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8034                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8035             </actions>
8036         </permacrud>
8037         </class>
8038         <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">
8039                 <fields oils_persist:primary="code">
8040                         <field name="code" reporter:datatype="id" />
8041                         <field name="marc_code" reporter:datatype="text"/>
8042                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8043                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8044                         <field name="rtl" reporter:datatype="bool"/>
8045                 </fields>
8046                 <links/>
8047         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8048             <actions>
8049                 <create permission="CREATE_LOCALE" global_required="true"/>
8050                 <retrieve/>
8051                 <update permission="UPDATE_LOCALE" global_required="true"/>
8052                 <delete permission="DELETE_LOCALE" global_required="true"/>
8053             </actions>
8054         </permacrud>
8055         </class>
8056         <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">
8057                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8058                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
8059                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
8060                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
8061             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8062                 </fields>
8063                 <links>
8064                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8065                 </links>
8066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8067             <actions>
8068                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8069                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8070                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8071                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8072             </actions>
8073         </permacrud>
8074         </class>
8075
8076         <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">
8077                 <fields oils_persist:primary="id">
8078                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8079                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8080                 </fields>
8081                 <links/>
8082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8083             <actions>
8084                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8085                 <retrieve/>
8086                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8087                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8088             </actions>
8089         </permacrud>
8090         </class>
8091
8092         <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">
8093                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8094                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8095                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8096                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8097                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8098                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8099                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8100                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8101                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8102                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8103                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8104                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8105                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8106                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8107                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8108                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8109                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8110                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8111                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8112                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8113                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8114                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8115                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8116                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8117                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8118                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8119                 </fields>
8120                 <links>
8121                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8122                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8123                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8124                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8125                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8126                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8127                 </links>
8128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8129             <actions>
8130                 <create permission="user_request.create">
8131                     <context link="usr" field="home_ou"/>
8132                                 </create>
8133                 <retrieve permission="user_request.view">
8134                     <context link="usr" field="home_ou"/>
8135                                 </retrieve>
8136                 <update permission="user_request.update">
8137                     <context link="usr" field="home_ou"/>
8138                                 </update>
8139                 <delete permission="user_request.delete">
8140                     <context link="usr" field="home_ou"/>
8141                                 </delete>
8142             </actions>
8143         </permacrud>
8144         </class>
8145
8146         <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">
8147                 <fields oils_persist:primary="code">
8148                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8149                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8150                 </fields>
8151                 <links/>
8152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8153             <actions>
8154                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8155                 <retrieve/>
8156                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8157                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8158             </actions>
8159         </permacrud>
8160         </class>
8161
8162         <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">
8163                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8164                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8165                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8166                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8167                         <field reporter:label="Ratio" name="ratio" />
8168                 </fields>
8169                 <links>
8170                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8171                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8172                 </links>
8173                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8174                         <actions>
8175                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8176                                 <retrieve/>
8177                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8178                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8179                         </actions>
8180                 </permacrud>
8181         </class>
8182
8183         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8184                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8185                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8186                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8187                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8188                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8189                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8190                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8191                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8192                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8193                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8194                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8195                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8196                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8197                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8198                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8199                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8200                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8201                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8202                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8203                 </fields>
8204                 <links>
8205                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8207             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8208             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8209                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8210                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8211                 </links>
8212         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8213             <actions>
8214                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8215                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8216                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8217                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8218             </actions>
8219         </permacrud>
8220         </class>
8221
8222         <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">
8223                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8224                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8225                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8226                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8227                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8228                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8229                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8230                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8231                 </fields>
8232                 <links>
8233                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8234                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8235                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8236                 </links>
8237         </class>
8238
8239         <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">
8240                 <fields oils_persist:primary="code">
8241                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8242                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8243                 </fields>
8244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8245             <actions>
8246                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8247                 <retrieve/>
8248                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8249                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8250             </actions>
8251                 </permacrud>
8252         </class>
8253
8254         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8255                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8256                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8257                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8258                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8259                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8260                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8261                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8262                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8263                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8264                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8265                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8266                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8267                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
8268                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8269                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8270                 </fields>
8271                 <links>
8272                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8273                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8274                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8275                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8276                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8277                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8278                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8279                 </links>
8280         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8281             <actions>
8282                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8283                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8284                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8285                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8286             </actions>
8287         </permacrud>
8288         </class>
8289
8290         <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">
8291                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8292                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8293                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8294                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8295                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8296                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8297                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8298                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8299                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8300                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8301                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8302                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8303                 </fields>
8304                 <links>
8305                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8306                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8307                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8308                 </links>
8309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8310             <actions>
8311                 <create   permission="ADMIN_INVOICE">
8312                                         <context link="invoice" field="receiver"/>
8313                                 </create>
8314                 <retrieve permission="ADMIN_INVOICE">
8315                                         <context link="invoice" field="receiver"/>
8316                                 </retrieve>
8317                 <update   permission="ADMIN_INVOICE">
8318                                         <context link="invoice" field="receiver"/>
8319                                 </update>
8320                                 <delete   permission="ADMIN_INVOICE">
8321                                         <context link="invoice" field="receiver"/>
8322                                 </delete>
8323             </actions>
8324         </permacrud>
8325         </class>
8326
8327         <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">
8328                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8329                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8330                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8331                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8332                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8333                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8334                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8335                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8336                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8337                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8338                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8339                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8340                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8341                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8342                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8343                 </fields>
8344                 <links>
8345                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8346                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8347                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8348                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8349                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8350                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8351                 </links>
8352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8353             <actions>
8354                 <create   permission="ADMIN_INVOICE">
8355                                         <context link="invoice" field="receiver"/>
8356                                 </create>
8357                 <retrieve permission="ADMIN_INVOICE">
8358                                         <context link="invoice" field="receiver"/>
8359                                 </retrieve>
8360                 <update   permission="ADMIN_INVOICE">
8361                                         <context link="invoice" field="receiver"/>
8362                                 </update>
8363                                 <delete   permission="ADMIN_INVOICE">
8364                                         <context link="invoice" field="receiver"/>
8365                                 </delete>
8366             </actions>
8367         </permacrud>
8368         </class>
8369
8370         <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">
8371                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8372                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8373                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8374                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8375                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8376                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8377                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8378                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8379                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8380                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8381                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8382                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8383                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8384                 </fields>
8385                 <links>
8386                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8387                 </links>
8388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8389             <actions>
8390                 <create permission="ADMIN_PROVIDER">
8391                     <context link="provider" field="owner"/>
8392                 </create>
8393                 <retrieve permission="ADMIN_PROVIDER">
8394                     <context link="provider" field="owner"/>
8395                 </retrieve>
8396                 <update permission="ADMIN_PROVIDER">
8397                     <context link="provider" field="owner"/>
8398                 </update>
8399                 <delete permission="ADMIN_PROVIDER">
8400                     <context link="provider" field="owner"/>
8401                 </delete>
8402             </actions>
8403         </permacrud>
8404         </class>
8405
8406         <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">
8407                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8408                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8409                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8410                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8411                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8412                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8413                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8414         </fields>
8415                 <links>
8416                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8417                 </links>
8418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8419             <actions>
8420                 <create permission="ADMIN_PROVIDER">
8421                     <context link="provider" field="owner"/>
8422                 </create>
8423                 <retrieve permission="ADMIN_PROVIDER">
8424                     <context link="provider" field="owner"/>
8425                 </retrieve>
8426                 <update permission="ADMIN_PROVIDER">
8427                     <context link="provider" field="owner"/>
8428                 </update>
8429                 <delete permission="ADMIN_PROVIDER">
8430                     <context link="provider" field="owner"/>
8431                 </delete>
8432             </actions>
8433         </permacrud>
8434     </class>
8435         <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">
8436                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8437                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8438                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8439                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8440                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8441                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8442                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8443                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8444                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8445                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8446                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8447                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8448                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8449                 </fields>
8450                 <links>
8451                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8452                 </links>
8453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8454             <actions>
8455                 <create permission="ADMIN_PROVIDER">
8456                     <context link="contact" jump='provider' field="owner"/>
8457                 </create>
8458                 <retrieve permission="ADMIN_PROVIDER">
8459                     <context link="contact" jump='provider' field="owner"/>
8460                 </retrieve>
8461                 <update permission="ADMIN_PROVIDER">
8462                     <context link="contact" jump='provider' field="owner"/>
8463                 </update>
8464                 <delete permission="ADMIN_PROVIDER">
8465                     <context link="contact" jump='provider' field="owner"/>
8466                 </delete>
8467             </actions>
8468         </permacrud>
8469         </class>
8470
8471         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8472                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8473                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8474                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8475                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8476                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8477                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8478                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8479                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8480                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8481                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8482                 </fields>
8483                 <links>
8484                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8485                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8486                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8487                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8488                 </links>
8489         </class>
8490
8491         <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">
8492                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8493                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8494                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8495                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8496                 </fields>
8497                 <links>
8498             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8499                 </links>
8500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8501                         <actions>
8502                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8503                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8504                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8505                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8506                         </actions>
8507                 </permacrud>
8508         </class>
8509
8510         <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">
8511                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8512                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8513                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8514                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8515                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8516                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8517                 </fields>
8518                 <links>
8519                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8520                 </links>
8521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8522                         <actions>
8523                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8524                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8525                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8526                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8527                         </actions>
8528                 </permacrud>
8529         </class>
8530
8531         <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">
8532                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8533                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8534                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8535                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8536                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8537                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8538                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8539                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8540                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8541                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8542                 </fields>
8543                 <links>
8544                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8545                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8546             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8547             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8548                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8549                 </links>
8550         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8551             <actions>
8552                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8553                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8554                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8555                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8556             </actions>
8557         </permacrud>
8558         </class>
8559
8560         <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">
8561                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8562                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8563                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8564                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8565                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8566                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8567                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8568                 </fields>
8569                 <links>
8570                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8571                 </links>
8572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8573                         <actions>
8574                                 <create permission="ADMIN_FUNDING_SOURCE">
8575                     <context link="funding_source" field="owner"/>
8576                 </create>
8577                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8578                     <context link="funding_source" field="owner"/>
8579                 </retrieve>
8580                                 <update permission="ADMIN_FUNDING_SOURCE">
8581                     <context link="funding_source" field="owner"/>
8582                 </update>
8583                                 <delete permission="ADMIN_FUNDING_SOURCE">
8584                     <context link="funding_source" field="owner"/>
8585                 </delete>
8586                         </actions>
8587                 </permacrud>
8588         </class>
8589
8590         <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">
8591                 <fields oils_persist:primary="id">
8592                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8593                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8594                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8595                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8596                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8597                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8598                 </fields>
8599                 <links>
8600                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8601                 </links>
8602         </class>
8603
8604         <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">
8605                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8606                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8607                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8608                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8609                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8610                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8611                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8612                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8613                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8614                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8615                 </fields>
8616                 <links>
8617                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8618                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8619                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8620                 </links>
8621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8622                         <actions>
8623                                 <create permission="ADMIN_ACQ_FUND">
8624                     <context link="fund" field="org"/>
8625                 </create>
8626                                 <retrieve permission="ADMIN_ACQ_FUND">
8627                     <context link="fund" field="org"/>
8628                 </retrieve>
8629                                 <update permission="ADMIN_ACQ_FUND">
8630                     <context link="fund" field="org"/>
8631                 </update>
8632                                 <delete permission="ADMIN_ACQ_FUND">
8633                     <context link="fund" field="org"/>
8634                 </delete>
8635                         </actions>
8636                 </permacrud>
8637         </class>
8638
8639         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8640                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8641                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8642                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8643                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8644                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8645                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8646                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8647                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8648                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8649                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8650                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8651                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8652                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8653                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8654                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8655                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8656                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8657                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8658                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8659                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8660                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8661                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8662                 </fields>
8663                 <links>
8664                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8665                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8666             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8667             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8668             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8669             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8670             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8671             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8672             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8673             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8674             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8675                 </links>
8676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8677             <actions>
8678                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8679                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8680                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8681                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8682             </actions>
8683         </permacrud>
8684         </class>
8685
8686         <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">
8687                 <fields oils_persist:primary="fund">
8688                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8689                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8690                 </fields>
8691                 <links>
8692                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8693                 </links>
8694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8695             <actions>
8696                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8697                                         <context link="fund" field="org" />
8698                 </retrieve>
8699             </actions>
8700         </permacrud>
8701         </class>
8702
8703         <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">
8704                 <fields oils_persist:primary="fund">
8705                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8706                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8707                 </fields>
8708                 <links>
8709                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8710                 </links>
8711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8712             <actions>
8713                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8714                                         <context link="fund" field="org" />
8715                 </retrieve>
8716             </actions>
8717         </permacrud>
8718         </class>
8719
8720         <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">
8721                 <fields oils_persist:primary="fund">
8722                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8723                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8724                 </fields>
8725                 <links>
8726                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8727                 </links>
8728         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8729             <actions>
8730                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8731                                         <context link="fund" field="org" />
8732                 </retrieve>
8733             </actions>
8734         </permacrud>
8735         </class>
8736
8737         <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">
8738                 <fields oils_persist:primary="fund">
8739                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8740                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8741                 </fields>
8742                 <links>
8743                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8744                 </links>
8745         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8746             <actions>
8747                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8748                                         <context link="fund" field="org" />
8749                 </retrieve>
8750             </actions>
8751         </permacrud>
8752         </class>
8753
8754         <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">
8755                 <fields oils_persist:primary="fund">
8756                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8757                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8758                 </fields>
8759                 <links>
8760                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8761                 </links>
8762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8763             <actions>
8764                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8765                                         <context link="fund" field="org" />
8766                 </retrieve>
8767             </actions>
8768         </permacrud>
8769         </class>
8770
8771    <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">
8772         <fields oils_persist:primary="fund">
8773             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8774             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8775         </fields>
8776         <links>
8777             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8778         </links>
8779     </class>
8780
8781    <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">
8782         <fields oils_persist:primary="fund">
8783             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8784             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8785         </fields>
8786         <links>
8787             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8788         </links>
8789     </class>
8790
8791    <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">
8792         <fields oils_persist:primary="fund">
8793             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8794             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8795         </fields>
8796         <links>
8797             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8798         </links>
8799     </class>
8800
8801    <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">
8802         <fields oils_persist:primary="fund">
8803             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8804             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8805         </fields>
8806         <links>
8807             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8808         </links>
8809     </class>
8810
8811    <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">
8812         <fields oils_persist:primary="fund">
8813             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8814             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8815         </fields>
8816         <links>
8817             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8818         </links>
8819     </class>
8820
8821         <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">
8822                 <fields oils_persist:primary="funding_source">
8823                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8824                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8825                 </fields>
8826                 <links>
8827                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8828                 </links>
8829         </class>
8830
8831         <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">
8832                 <fields oils_persist:primary="funding_source">
8833                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8834                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8835                 </fields>
8836                 <links>
8837                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8838                 </links>
8839         </class>
8840
8841         <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">
8842                 <fields oils_persist:primary="funding_source">
8843                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8844                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8845                 </fields>
8846                 <links>
8847                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8848                 </links>
8849         </class>
8850
8851         <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">
8852                 <fields oils_persist:primary="fund">
8853                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8854                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8855                 </fields>
8856                 <links>
8857                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8858                 </links>
8859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8860             <actions>
8861                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8862                                         <context link="fund" field="org" />
8863                 </retrieve>
8864             </actions>
8865         </permacrud>
8866     </class>
8867     <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">
8868         <oils_persist:source_definition><![CDATA[
8869             SELECT
8870                 acqf.*,
8871                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8872                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8873                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8874                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8875             FROM
8876                 acq.fund acqf
8877                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8878                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8879                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8880                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8881         ]]></oils_persist:source_definition>
8882         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8883             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8884             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8885             <field reporter:label="Name" name="name" reporter:datatype="text" />
8886             <field reporter:label="Year" name="year" reporter:datatype="int" />
8887             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8888             <field reporter:label="Code" name="code" reporter:datatype="text" />
8889             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8890             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8891             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8892             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8893             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8894
8895             <!-- non fund-native fields -->
8896             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8897             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8898             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8899             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8900         </fields>
8901         <links>
8902             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8903             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8904             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8905         </links>
8906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8907             <actions>
8908                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8909             </actions>
8910         </permacrud>
8911         </class>
8912         <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">
8913                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8914                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8915                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8916                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8917                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8918                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8919                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8920                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8921                 </fields>
8922                 <links>
8923                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8924                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8925                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8926                 </links>
8927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8928                         <actions>
8929                                 <create permission="ADMIN_ACQ_FUND">
8930                     <context link="fund" field="org"/>
8931                 </create>
8932                                 <retrieve permission="ADMIN_ACQ_FUND">
8933                     <context link="fund" field="org"/>
8934                 </retrieve>
8935                                 <update permission="ADMIN_ACQ_FUND">
8936                     <context link="fund" field="org"/>
8937                 </update>
8938                                 <delete permission="ADMIN_ACQ_FUND">
8939                     <context link="fund" field="org"/>
8940                 </delete>
8941                         </actions>
8942                 </permacrud>
8943         </class>
8944
8945     <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">
8946         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8947             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8948             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8949             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8950             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8951             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8952             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8953             <field reporter:label="Note" name="note" reporter:datatype="text" />
8954             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8955         </fields>
8956         <links>
8957             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8958             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8959             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8960         </links>
8961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8962                         <actions>
8963                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8964                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8965                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8966                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8967                         </actions>
8968                 </permacrud>
8969     </class>
8970
8971         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8972                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8973                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8974                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8975                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8976                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8977                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8978                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8979                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8980                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8981                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8982                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8983                 </fields>
8984                 <links>
8985                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8986                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8987                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8988                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8989                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8990                 </links>
8991                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8992                         <actions>
8993                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8994                         </actions>
8995                 </permacrud>
8996         </class>
8997
8998         <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">
8999                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9000                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9001                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9002                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9003                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9004                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9005                 </fields>
9006                 <links>
9007                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9008                 </links>
9009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9010                         <actions>
9011                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9012                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9013                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9014                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9015                         </actions>
9016                 </permacrud>
9017         </class>
9018
9019         <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">
9020                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9021                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9022                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9023                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9024                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9025                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9026                         <field reporter:label="State" name="state" reporter:datatype="text" />
9027                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9028                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9029                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9030                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9031                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9032                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9033                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9034                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9035                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9036                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9037                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9038                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9039                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9040                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9041                 </fields>
9042                 <links>
9043                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9044                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9045                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9046                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9047                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9048                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9049                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9050                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9051                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9052                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9053                 </links>
9054                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9055                         <actions>
9056                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9057                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9058                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9059                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9060                         </actions>
9061                 </permacrud>
9062         </class>
9063
9064         <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">
9065                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9066                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9067                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9068                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9069                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9070                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9071                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9072                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9073                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9074                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9075                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9076                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9077                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9078                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9079                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9080                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9081                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9082                 </fields>
9083                 <links>
9084                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9085                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9086                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9087                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9088                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9089                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9090                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9091                 </links>
9092                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9093             <actions>
9094                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9095             </actions>
9096                 </permacrud>
9097         </class>
9098
9099         <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">
9100                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9101                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9102                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9103                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9104                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9105                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9106                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9107                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9108                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9109                 </fields>
9110                 <links>
9111                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9112                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9113                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9114                 </links>
9115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9116             <actions>
9117                 <create permission="CREATE_PURCHASE_ORDER">
9118                     <context link="purchase_order" field="ordering_agency"/>
9119                 </create>
9120                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9121                     <context link="purchase_order" field="ordering_agency"/>
9122                 </retrieve>
9123                 <update permission="CREATE_PURCHASE_ORDER">
9124                     <context link="purchase_order" field="ordering_agency"/>
9125                 </update>
9126                 <delete permission="CREATE_PURCHASE_ORDER">
9127                     <context link="purchase_order" field="ordering_agency"/>
9128                 </delete>
9129             </actions>
9130                 </permacrud>
9131         </class>
9132
9133         <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">
9134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9135                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9136                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9137                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9138                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9139                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9140                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9141                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9142                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9143                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9144                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9145                 </fields>
9146                 <links>
9147                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9148                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9149                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9150                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9151                 </links>
9152                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9153             <actions>
9154                 <create permission="CREATE_PURCHASE_ORDER">
9155                     <context link="purchase_order" field="ordering_agency"/>
9156                 </create>
9157                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9158                     <context link="purchase_order" field="ordering_agency"/>
9159                 </retrieve>
9160                 <update permission="CREATE_PURCHASE_ORDER">
9161                     <context link="purchase_order" field="ordering_agency"/>
9162                 </update>
9163                 <delete permission="CREATE_PURCHASE_ORDER">
9164                     <context link="purchase_order" field="ordering_agency"/>
9165                 </delete>
9166             </actions>
9167                 </permacrud>
9168         </class>
9169
9170         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9171                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9172                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9173                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9174                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9175                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9176                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9177                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9178                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9179                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9180                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9181                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9182                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9183                         <field reporter:label="State" name="state" reporter:datatype="text" />
9184                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9185                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9186                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9187                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9188                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9189                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9190                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9191                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9192                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9193                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9194                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9195                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9196                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9197                 </fields>
9198                 <links>
9199                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9200                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9201                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9202                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9203                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9204                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9205                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9206                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9207                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9208                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9209                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9210                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9211                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9212                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9213                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9214                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9215                 </links>
9216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9217                         <actions>
9218                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9219                                         <context link="purchase_order" field="ordering_agency"/>
9220                                         <context link="picklist" field="org_unit"/>
9221                                 </retrieve>
9222                         </actions>
9223                 </permacrud>
9224         </class>
9225
9226         <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">
9227                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9228                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9229                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9230                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9231                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9232                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9233                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9234                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9235                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9236                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9237                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9238                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9239                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9240                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9241                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9242                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9243                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9244                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9245                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9246                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9247                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9248                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9249                 </fields>
9250                 <links>
9251                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9252                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9253                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9254                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9255                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9256                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9257                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9258                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9259                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9260                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9261                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9262                 </links>
9263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9264                         <actions>
9265                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9266                                         <context link="purchase_order" field="ordering_agency"/>
9267                                         <context link="picklist" field="org_unit"/>
9268                                 </retrieve>
9269                         </actions>
9270                 </permacrud>
9271         </class>
9272
9273         <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">
9274                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9275                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9276                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9277                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9278                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9279                 </fields>
9280                 <links>
9281                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9282                 </links>
9283                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9284                         <actions>
9285                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9286                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9287                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9288                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9289                         </actions>
9290                 </permacrud>
9291         </class>
9292
9293         <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">
9294                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9295                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9296                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9297                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9298                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9299                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9300                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9301                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9302                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9303                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9304                 </fields>
9305                 <links>
9306                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9307                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9308                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9309                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9310                 </links>
9311         </class>
9312
9313         <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">
9314                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9315                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9316                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9317                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9318                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9319                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9320                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9321                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9322                 </fields>
9323                 <links>
9324                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9325                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9326                 </links>
9327         </class>
9328
9329         <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">
9330                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9331                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9332                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9333                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9334                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9335                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9336                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9337                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9338                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9339                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9340                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9341                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9342                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9343                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9344                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9345                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9346                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9347                 </fields>
9348                 <links>
9349                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9350                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9351                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9352                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9353                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9354                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9355                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9356                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9357                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9358                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9359                 </links>
9360         </class>
9361
9362         <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">
9363                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9364                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9365                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9366                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9367                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9368                 </fields>
9369                 <links/>
9370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9371                         <actions>
9372                                 <retrieve />
9373                         </actions>
9374                 </permacrud>
9375         </class>
9376
9377         <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">
9378                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9379                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9380                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9381                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9382                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9383                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9384             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9385                 </fields>
9386                 <links/>
9387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9388             <actions>
9389                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9390                 <retrieve />
9391                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9392                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9393             </actions>
9394         </permacrud>
9395         </class>
9396
9397         <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">
9398                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9399                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9400                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9401                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9402                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9403                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9404                 </fields>
9405                 <links/>
9406         </class>
9407         <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">
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="User" name="usr" reporter:datatype="link" />
9413                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9414                 </fields>
9415                 <links>
9416                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9417                 </links>
9418         </class>
9419
9420         <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">
9421             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9422                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9423                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9424                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9425                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9426                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9427                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9428         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9429
9430             </fields>
9431             <links>
9432                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9433             </links>
9434             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9435                 <actions>
9436                     <create permission="ADMIN_PROVIDER">
9437                         <context link="provider" field="owner"/>
9438                     </create>
9439                     <retrieve permission="ADMIN_PROVIDER">
9440                         <context link="provider" field="owner"/>
9441                     </retrieve>
9442                     <update permission="ADMIN_PROVIDER">
9443                         <context link="provider" field="owner"/>
9444                     </update>
9445                     <delete permission="ADMIN_PROVIDER">
9446                         <context link="provider" field="owner"/>
9447                     </delete>
9448                 </actions>
9449             </permacrud>
9450         </class>
9451         
9452         <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">
9453             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9454                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9455                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9456                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9457                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9458             </fields>
9459             <links>
9460                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9461             </links>
9462             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9463                 <actions>
9464                     <create permission="ADMIN_PROVIDER">
9465                         <context link="provider" field="owner"/>
9466                     </create>
9467                     <retrieve permission="ADMIN_PROVIDER">
9468                         <context link="provider" field="owner"/>
9469                     </retrieve>
9470                     <update permission="ADMIN_PROVIDER">
9471                         <context link="provider" field="owner"/>
9472                     </update>
9473                     <delete permission="ADMIN_PROVIDER">
9474                         <context link="provider" field="owner"/>
9475                     </delete>
9476                 </actions>
9477             </permacrud>
9478         </class>
9479         
9480         <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">
9481             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9482                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9483                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9484                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9485                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9486                 </fields>
9487                 <links/>
9488         </class>
9489
9490         <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">
9491                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9492                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9493                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9494                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9495                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9496                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9497                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9498                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9499                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9500                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9501                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9502                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9503                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9504                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9505                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9506                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9507                 </fields>
9508                 <links>
9509                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9510                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9511                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9512                 </links>
9513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9514             <actions>
9515                 <create permission="ADMIN_PROVIDER">
9516                     <context link="provider" field="owner"/>
9517                 </create>
9518                 <retrieve permission="ADMIN_PROVIDER">
9519                     <context link="provider" field="owner"/>
9520                 </retrieve>
9521                 <update permission="ADMIN_PROVIDER">
9522                     <context link="provider" field="owner"/>
9523                 </update>
9524                 <delete permission="ADMIN_PROVIDER">
9525                     <context link="provider" field="owner"/>
9526                 </delete>
9527             </actions>
9528         </permacrud>
9529         </class>
9530
9531         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9532                 oils_obj:fieldmapper="acq::edi_attr" 
9533                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9534                 <fields oils_persist:primary="key">
9535                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9536                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9537                 </fields>
9538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9539             <actions>
9540                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9541                 <retrieve/>
9542                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9543                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9544             </actions>
9545         </permacrud>
9546         </class>
9547         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9548                 oils_obj:fieldmapper="acq::edi_attr_set" 
9549                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9550                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9551                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9552                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9553                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9554                 </fields>
9555                 <links>
9556                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9557                 </links>
9558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9559             <actions>
9560                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9561                 <retrieve/>
9562                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9563                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9564             </actions>
9565         </permacrud>
9566         </class>
9567         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9568                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9569                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9570                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9571                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9572                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9573                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9574                 </fields>
9575                 <links>
9576                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9577                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9578                 </links>
9579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9580             <actions>
9581                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9582                 <retrieve/>
9583                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9584                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9585             </actions>
9586         </permacrud>
9587         </class>
9588
9589
9590         <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">
9591                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9592                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9593                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9594                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9595                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9596                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9597                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9598                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9599                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9600                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9601                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9602                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9603                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9604                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9605                 </fields>
9606                 <links>
9607                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9608                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9609                 </links>
9610         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9611             <actions>
9612                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9613                     <context link="account" jump="provider" field="owner"/>
9614                 </retrieve>
9615                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9616                     <context link="account" jump="provider" field="owner"/>
9617                 </update>
9618                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9619                     <context link="account" jump="provider" field="owner"/>
9620                 </delete>
9621             </actions>
9622         </permacrud>
9623         </class>
9624
9625
9626         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9627                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9628                         <field name="id" reporter:datatype="id" />
9629                         <field name="parent" reporter:datatype="link"/>
9630                         <field name="owner" reporter:datatype="link"/>
9631                         <field name="create_time" reporter:datatype="timestamp"/>
9632                         <field name="name" reporter:datatype="text"/>
9633                         <field name="shared" reporter:datatype="bool"/>
9634                         <field name="share_with" reporter:datatype="link"/>
9635                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9636                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9637                 </fields>
9638                 <links>
9639                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9640                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9641                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9642                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9643                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9644                 </links>
9645         </class>
9646         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9647                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9648                         <field name="id" reporter:datatype="id" />
9649                         <field name="parent" reporter:datatype="link"/>
9650                         <field name="owner" reporter:datatype="link"/>
9651                         <field name="create_time" reporter:datatype="timestamp"/>
9652                         <field name="name" reporter:datatype="text"/>
9653                         <field name="shared" reporter:datatype="bool"/>
9654                         <field name="share_with" reporter:datatype="link"/>
9655                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9656                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9657                 </fields>
9658                 <links>
9659                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9660                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9661                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9662                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9663                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9664                 </links>
9665         </class>
9666         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9667                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9668                         <field name="id" reporter:datatype="id" />
9669                         <field name="parent" reporter:datatype="link"/>
9670                         <field name="owner" reporter:datatype="link"/>
9671                         <field name="create_time" reporter:datatype="timestamp"/>
9672                         <field name="name" reporter:datatype="text"/>
9673                         <field name="shared" reporter:datatype="bool"/>
9674                         <field name="share_with" reporter:datatype="link"/>
9675                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9676                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9677                 </fields>
9678                 <links>
9679                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9680                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9681                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9682                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9683                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9684                 </links>
9685         </class>
9686         <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">
9687                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9688                         <field name="id" reporter:datatype="id" />
9689                         <field name="owner" reporter:datatype="link"/>
9690                         <field name="create_time" reporter:datatype="timestamp"/>
9691                         <field name="name" reporter:datatype="text"/>
9692                         <field name="data" reporter:datatype="text"/>
9693                         <field name="folder" reporter:datatype="link"/>
9694                         <field name="description" reporter:datatype="text"/>
9695                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9696                 </fields>
9697                 <links>
9698                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9699                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9700                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9701                 </links>
9702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9703             <actions>
9704                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9705                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9706                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9707                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9708             </actions>
9709         </permacrud>
9710         </class>
9711         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9712                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9713                         <field name="id" reporter:datatype="id" />
9714                         <field name="owner" reporter:datatype="link"/>
9715                         <field name="create_time" reporter:datatype="timestamp"/>
9716                         <field name="template" reporter:datatype="link"/>
9717                         <field name="data" reporter:datatype="text"/>
9718                         <field name="folder" reporter:datatype="link"/>
9719                         <field name="recur" reporter:datatype="bool"/>
9720                         <field name="recurrence" reporter:datatype="interval"/>
9721                         <field name="name" reporter:datatype="text"/>
9722                         <field name="description" reporter:datatype="text"/>
9723                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9724                 </fields>
9725                 <links>
9726                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9727                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9728                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9729                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9730                 </links>
9731         </class>
9732         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9733                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9734                         <field name="id" reporter:datatype="id" />
9735                         <field name="runner" reporter:datatype="link"/>
9736                         <field name="start_time" reporter:datatype="timestamp"/>
9737                         <field name="complete_time" reporter:datatype="timestamp"/>
9738                         <field name="run_time" reporter:datatype="timestamp"/>
9739                         <field name="email" reporter:datatype="text"/>
9740                         <field name="excel_format" reporter:datatype="bool"/>
9741                         <field name="csv_format" reporter:datatype="bool"/>
9742                         <field name="html_format" reporter:datatype="bool"/>
9743                         <field name="error_code" reporter:datatype="int"/>
9744                         <field name="error_text" reporter:datatype="text"/>
9745                         <field name="report" reporter:datatype="link"/>
9746                         <field name="folder" reporter:datatype="link"/>
9747                         <field name="chart_pie" reporter:datatype="bool"/>
9748                         <field name="chart_bar" reporter:datatype="bool"/>
9749                         <field name="chart_line" reporter:datatype="bool"/>
9750                 </fields>
9751                 <links>
9752                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9753                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9754                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9755                 </links>
9756         </class>
9757         <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">
9758                 <fields oils_persist:primary="id">
9759                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9760                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9761                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9762                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9763                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9764                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9765                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9766                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9767                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9768                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9769                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9770                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9771                 </fields>
9772                 <links>
9773                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9774                 </links>
9775                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9776                         <actions>
9777                                 <retrieve />
9778                         </actions>
9779                 </permacrud>
9780         </class>
9781         <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">
9782                 <fields oils_persist:primary="id">
9783                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9784                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9785                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9786                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9787                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9788                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9789                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9790                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9791                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9792                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9793                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9794                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9795                 </fields>
9796                 <links>
9797                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9798                 </links>
9799         </class>
9800         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9801                 <fields oils_persist:primary="id">
9802                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9803                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9804                         <field reporter:label="Fingerprint" name="fingerprint" />
9805                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9806                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9807                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9808                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9809                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9810                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9811                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9812                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9813                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9814                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9815                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9816                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9817                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9818                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9819                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9820                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9821                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9822                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9823                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9824                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9825                 </fields>
9826                 <links>
9827                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9828                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9829                 </links>
9830         </class>
9831         <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">
9832                 <fields oils_persist:primary="id">
9833                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9834                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9835                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9836                 </fields>
9837                 <links>
9838                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9839                 </links>
9840         </class>
9841         <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">
9842                 <fields oils_persist:primary="id">
9843                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9844                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9845                 </fields>
9846                 <links>
9847                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9848                 </links>
9849         </class>
9850         <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">
9851                 <fields oils_persist:primary="id">
9852                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9853                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9854                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9855                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9856                 </fields>
9857                 <links>
9858                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9859                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9860                 </links>
9861         </class>
9862         <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">
9863                 <fields oils_persist:primary="xact">
9864                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9865                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9866                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9867                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9868                 </fields>
9869                 <links>
9870                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9871                 </links>
9872         </class>
9873         <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">
9874                 <fields oils_persist:primary="xact">
9875                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9876                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9877                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9878                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9879                 </fields>
9880                 <links>
9881                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9882                 </links>
9883         </class>
9884         <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)">
9885                 <fields oils_persist:primary="id">
9886                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9887                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9888                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9889                 </fields>
9890                 <links>
9891                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9892                 </links>
9893         </class>
9894         <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">
9895                 <fields oils_persist:primary="id">
9896                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9897                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9898                 </fields>
9899                 <links>
9900                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9901                 </links>
9902         </class>
9903         <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">
9904                 <fields oils_persist:primary="bibid">
9905                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
9906                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
9907                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
9908                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
9909                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
9910                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
9911                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
9912                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
9913                 </fields>
9914                 <links>
9915                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
9916                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9917                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9918                 </links>
9919         </class>
9920         <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">
9921                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9922                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9923                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9924                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9925                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9926                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9927                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9928                 </fields>
9929                 <links>
9930                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9931                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9932                 </links>
9933                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9934                         <actions>
9935                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9936                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9937                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9938                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9939                         </actions>
9940                 </permacrud>
9941         </class>
9942         <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">
9943                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9944                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9945                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9946                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9947                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9948                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9949                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9950                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9951                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9952                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9953                 </fields>
9954                 <links>
9955                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9956                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9957                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9958                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9959                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9960                 </links>
9961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9962                         <actions>
9963                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9964                                         <context link="formula" field="owner"/>
9965                                 </create>
9966                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9967                                         <context link="formula" field="owner"/>
9968                                 </retrieve>
9969                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9970                                         <context link="formula" field="owner"/>
9971                                 </update>
9972                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9973                                         <context link="formula" field="owner"/>
9974                                 </delete>
9975                         </actions>
9976                 </permacrud>
9977         </class>
9978
9979         <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">
9980                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9981                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9982                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9983                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9984                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9985                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9986                 </fields>
9987                 <links>
9988                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9989                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9990                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9991                 </links>
9992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9993                         <actions>
9994                                 <create permission="CREATE_PURCHASE_ORDER">
9995                                         <context link="formula" field="owner"/>
9996                 </create>
9997                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9998                                         <context link="formula" field="owner"/>
9999                 </retrieve>
10000                                 <update permission="CREATE_PURCHASE_ORDER">
10001                                         <context link="formula" field="owner"/>
10002                 </update>
10003                                 <delete permission="CREATE_PURCHASE_ORDER">
10004                                         <context link="formula" field="owner"/>
10005                 </delete>
10006                         </actions>
10007                 </permacrud>
10008         </class>
10009
10010         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10011                 <fields oils_persist:primary="id">
10012                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10013                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10014                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10015                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10016                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10017                 </fields>
10018                 <links>
10019                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10020                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10021                 </links>
10022         </class>
10023
10024         <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">
10025                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10026                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10027                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10028                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10029                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10030                 </fields>
10031                 <links>
10032                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10033                 </links>
10034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10035                         <actions>
10036                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10037                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10038                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10039                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10040                         </actions>
10041                 </permacrud>
10042         </class>
10043
10044         <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">
10045                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10046                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10047                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10048                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10049                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10050                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10051                 </fields>
10052                 <links>
10053                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10054                 </links>
10055                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10056                         <actions>
10057                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10058                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10059                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10060                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10061                         </actions>
10062                 </permacrud>
10063         </class>
10064
10065         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10066                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10067                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10068                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10069                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10070                 </fields>
10071                 <links>
10072                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10073                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10074                 </links>
10075         </class>
10076
10077         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10078                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10079                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10080                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10081                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10082                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10083                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10084                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10085                 </fields>
10086                 <links>
10087                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10088                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10089                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10090                 </links>
10091         </class>
10092
10093         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10094                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10095                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10096                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10097                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10098                 </fields>
10099                 <links>
10100                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10101                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10102                 </links>
10103         </class>
10104
10105         <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">
10106                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10107                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10108                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10109                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10110                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10111                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10112                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10113                 </fields>
10114                 <links>
10115                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10116                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10117                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10118                 </links>
10119         </class>
10120
10121         <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">
10122                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10123                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10124                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10125                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10126                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10127                 </fields>
10128                 <links>
10129                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10130                 </links>
10131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10132             <actions>
10133                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10134                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10135                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10136                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10137             </actions>
10138                 </permacrud>
10139         </class>
10140
10141         <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">
10142                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10143                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10144                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10145                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10146                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10147                 </fields>
10148                 <links>
10149                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10150                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10151                 </links>
10152                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10153                         <actions>
10154                                 <create permission="ADMIN_CLAIM_POLICY">
10155                                         <context link="claim_policy" field="org_unit"/>
10156                 </create>
10157                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10158                                         <context link="claim_policy" field="org_unit"/>
10159                 </retrieve>
10160                                 <update permission="ADMIN_CLAIM_POLICY">
10161                                         <context link="claim_policy" field="org_unit"/>
10162                 </update>
10163                                 <delete permission="ADMIN_CLAIM_POLICY">
10164                                         <context link="claim_policy" field="org_unit"/>
10165                 </delete>
10166                         </actions>
10167                 </permacrud>
10168         </class>
10169
10170     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10171         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10172             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10173             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10174             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10175             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10176             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10177             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10178             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10179             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10180             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10181             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10182             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10183             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10184             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10185             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10186             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10187             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10188         </fields>
10189         <links>
10190             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10191         </links>
10192     </class>
10193
10194     <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">
10195         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10196             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10197             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10198             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10199             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10200             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10201         </fields>
10202     </class>
10203
10204     <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">
10205         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10206             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10207             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10208             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10209             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10210             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10211             <field reporter:label="City" name="city" reporter:datatype="text"/>
10212             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10213             <field reporter:label="State" name="state" reporter:datatype="text"/>
10214             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10215             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10216             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10217         </fields>
10218     </class>
10219
10220     <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">
10221         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10222             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10223             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10224             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10225             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10226             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10227             <field reporter:label="City" name="city" reporter:datatype="text"/>
10228             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10229             <field reporter:label="State" name="state" reporter:datatype="text"/>
10230             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10231             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10232             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10233         </fields>
10234     </class>
10235
10236     <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">
10237         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10238             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10239             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10240             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10241             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10242             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10243             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10244         </fields>
10245     </class>
10246
10247     <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">
10248         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10249             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10250             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10251             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10252             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10253             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10254             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10255         </fields>
10256     </class>
10257
10258         <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">
10259                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10260                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10261                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10262                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10263                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10264                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10265                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10266                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10267                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10268                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10269                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10270                 </fields>
10271                 <links>
10272                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10273                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10274                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10275                 </links>
10276                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10277                         <actions>
10278                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10279                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10280                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10281                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10282                         </actions>
10283                 </permacrud>
10284         </class>
10285
10286         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10287                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10288                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10289                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10290                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10291                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10292                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10293                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10294                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10295                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10296                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10297                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10298                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10299                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10300                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10301                 </fields>
10302                 <links>
10303                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10304                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10305                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10306                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10307                 </links>
10308                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10309                         <actions>
10310                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10311                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10312                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10313                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10314                         </actions>
10315                 </permacrud>
10316         </class>
10317
10318         <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">
10319                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10320                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10321                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10322                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10323                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10324                 </fields>
10325                 <links>
10326                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10327                 </links>
10328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10329                         <actions>
10330                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10331                     <context link="fieldset" field="owning_lib"/>
10332                 </create>
10333                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10334                     <context link="fieldset" field="owning_lib"/>
10335                 </retrieve>
10336                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10337                     <context link="fieldset" field="owning_lib"/>
10338                 </update>
10339                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10340                     <context link="fieldset" field="owning_lib"/>
10341                 </delete>
10342                         </actions>
10343                 </permacrud>
10344         </class>
10345
10346     <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">
10347         <fields>
10348             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10349             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10350             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10351         </fields>
10352                 <links>
10353                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10354                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10355                 </links>
10356     </class>
10357
10358     <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">
10359         <fields>
10360             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10361             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10362         </fields>
10363                 <links>
10364                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10365                 </links>
10366     </class>
10367
10368     <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">
10369         <fields>
10370             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10371             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10372             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10373         </fields>
10374                 <links>
10375                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10376                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10377                 </links>
10378     </class>
10379
10380     <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">
10381         <fields>
10382             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10383             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10384         </fields>
10385                 <links>
10386                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10387                 </links>
10388     </class>
10389
10390     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10391                 <oils_persist:source_definition>
10392
10393             SELECT  DISTINCT l.*
10394               FROM  action.unfulfilled_hold_loops l
10395                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10396               WHERE l.count = m.max
10397
10398                 </oils_persist:source_definition>
10399         <fields>
10400             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10401             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10402             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10403         </fields>
10404                 <links>
10405                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10406                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10407                 </links>
10408     </class>
10409
10410         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10411                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10412                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10413                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10414                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10415                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10416                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10417                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10418                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10419                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10420                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10421                 </fields>
10422                 <links>
10423                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10424                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10425                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10426                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10427                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10428                 </links>
10429         </class>
10430
10431         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10432                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10433                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10434                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10435                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10436                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10437                 </fields>
10438                 <links>
10439                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10440                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10441                 </links>
10442         </class>
10443
10444         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10445                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10446                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10447                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10448                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10449                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10450                 </fields>
10451                 <links>
10452                 </links>
10453         </class>
10454
10455         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10456                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10457                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10458                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10459                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10460                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10461                 </fields>
10462                 <links>
10463                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10464                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10465                 </links>
10466         </class>
10467         
10468         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10469                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10470                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10471                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10472                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10473                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10474                 </fields>
10475                 <links>
10476                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10477                 </links>
10478         </class>
10479         
10480         <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">
10481                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10482                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10483                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10484                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10485                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10486                 </fields>
10487                 <links>
10488                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10489                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10490                 </links>
10491         </class>
10492
10493         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10494                 <fields oils_persist:primary="name">
10495                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10496                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10497                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10498                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10499                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10500                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10501                 </fields>
10502                 <links>
10503                 </links>
10504         </class>
10505
10506         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10507                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10508                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10509                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10510                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10511                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10512                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10513                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10514                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10515                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10516                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10517                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10518                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10519                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10520                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10521                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10522                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10523                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10524                 </fields>
10525                 <links>
10526                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10527                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10528                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10529                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10530                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10531                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10532                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10533                 </links>
10534         </class>
10535
10536         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10537                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10538                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10539                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10540                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10541                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10542                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10543                 </fields>
10544                 <links>
10545                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10546                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10547                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10548                 </links>
10549         </class>
10550
10551         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10552                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10553                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10554                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10555                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10556                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10557                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10558                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10559                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10560                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10561                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10562                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10563                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10564                 </fields>
10565                 <links>
10566                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10567                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10568                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10569                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10570                 </links>
10571         </class>
10572
10573         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10574                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10575                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10576                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10577                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10578                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10579                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10580                 </fields>
10581                 <links>
10582                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10583                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10584                 </links>
10585         </class>
10586
10587         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10588                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10589                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10590                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10591                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10592                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10593                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10594                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
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="qobi" controller="open-ils.cstore" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
10603                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10604                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10605                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10606                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10607                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10608                 </fields>
10609                 <links>
10610                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10611                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10612                 </links>
10613         </class>
10614
10615         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10616                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10617                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10618                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10619                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10620                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10621                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10622                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10623                 </fields>
10624                 <links>
10625                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10626                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10627                 </links>
10628         </class>
10629
10630         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10631                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10632                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10633                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10634                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10635                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10636                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10637                 </fields>
10638                 <links>
10639                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10640                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10641                 </links>
10642         </class>
10643
10644         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10645                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10646                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10647                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10648                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10649                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10650                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10651                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10652                 </fields>
10653                 <links>
10654                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10655                 </links>
10656         </class>
10657
10658         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10659                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10660                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10661                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10662                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10663                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10664                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10665                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10666                 </fields>
10667                 <links>
10668                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10669                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10670                 </links>
10671         </class>
10672
10673         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10674                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10675                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10676                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10677                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10678                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10679                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10680                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10681                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10682                 </fields>
10683                 <links>
10684                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10685                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10686                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10687                 </links>
10688         </class>
10689
10690         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10691                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10692                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10693                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10694                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10695                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10696                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10697                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10698                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10699                 </fields>
10700                 <links>
10701                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10702                 </links>
10703         </class>
10704
10705         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10706                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10707                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10708                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10709                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10710                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10711                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10712                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10713                 </fields>
10714                 <links>
10715                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10716                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10717                 </links>
10718         </class>
10719
10720         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10721                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10722                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10723                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10724                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10725                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10726                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10727                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10728                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10729                 </fields>
10730                 <links>
10731                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10732                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10733                 </links>
10734         </class>
10735
10736         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10737                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10738                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10739                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10740                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10741                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10742                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10743                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10744                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10745                 </fields>
10746                 <links>
10747                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10748                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10749                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10750                 </links>
10751         </class>
10752
10753         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10754                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10755                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10756                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10757                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10758                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10759                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10760                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10761                 </fields>
10762                 <links>
10763                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10764                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10765                 </links>
10766         </class>
10767
10768         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null 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="Negate?" name="negate" reporter:datatype="bool"/>
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="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number 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="Literal" name="literal" reporter:datatype="text"/>
10788                 </fields>
10789                 <links>
10790                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10791                 </links>
10792         </class>
10793
10794         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10795                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10796                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10797                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10798                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10799                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10800                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10801                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10802                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10803                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10804                 </fields>
10805                 <links>
10806                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10807                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10808                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10809                 </links>
10810         </class>
10811
10812         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10813                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10814                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10815                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10816                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10817                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10818                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10819                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
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="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String 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="Literal" name="literal" reporter:datatype="text"/>
10833                 </fields>
10834                 <links>
10835                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10836                 </links>
10837         </class>
10838
10839         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10840                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10841                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10842                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10843                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10844                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10845                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10846                 </fields>
10847                 <links>
10848                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10849                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10850                 </links>
10851         </class>
10852
10853         <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">
10854                 <fields oils_persist:primary="id">
10855                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10856                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10857                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10858                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10859                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10860                 </fields>
10861                 <links>
10862                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10863                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10864                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10865                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10866                 </links>
10867         </class>
10868
10869         <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">
10870                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10871                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10872                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10873                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10874                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10875                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10876                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10877                         <field reporter:label="Default Value" name="default_val" 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="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">
10888                 <fields oils_persist:primary="ptype_key">
10889                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10890                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10891                 </fields>
10892                 <links/>
10893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10894                         <actions>
10895                                 <retrieve/>
10896                         </actions>
10897                 </permacrud>
10898         </class>
10899
10900         <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">
10901                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10902                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10903                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10904                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10905                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10906                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10907                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10908                 </fields>
10909                 <links>
10910                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10911                 </links>
10912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10913                         <actions>
10914                                 <retrieve/>
10915                         </actions>
10916                 </permacrud>
10917         </class>
10918
10919         <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">
10920                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10921                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10922                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10923                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10924                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10925                 </fields>
10926                 <links>
10927                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10928                 </links>
10929                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10930                         <actions>
10931                                 <retrieve/>
10932                         </actions>
10933                 </permacrud>
10934         </class>
10935
10936     <class
10937         id="uvs"
10938         controller="open-ils.cstore open-ils.pcrud"
10939         oils_obj:fieldmapper="url_verify::session"
10940         oils_persist:tablename="url_verify.session"
10941         reporter:label="URL Verification Session"
10942     >
10943         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10944             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10945             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10946                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10947             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10948             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10949             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10950             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10951             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10952             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10953         </fields>
10954
10955         <links>
10956             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10957             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10958             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10959             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10960             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10961         </links>
10962
10963         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10964             <actions>
10965                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10966             </actions>
10967         </permacrud>
10968
10969     </class>
10970
10971     <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">
10972         <oils_persist:source_definition>
10973             SELECT
10974                 cbrebi.id AS id,  -- so we can have a pkey in our view
10975                 uvs.id AS session,
10976                 uvs.owning_lib,
10977                 cbrebi.target_biblio_record_entry
10978             FROM url_verify.session uvs
10979             JOIN container.biblio_record_entry_bucket cbreb
10980                 ON (uvs.container = cbreb.id)
10981             JOIN container.biblio_record_entry_bucket_item cbrebi
10982                 ON (cbrebi.bucket = cbreb.id)
10983         </oils_persist:source_definition>
10984         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10985             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10986             <field reporter:label="Session" name="session" reporter:datatype="link" />
10987             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10988             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10989         </fields>
10990         <links>
10991             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10992             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10993             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10994         </links>
10995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10996             <actions>
10997                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10998             </actions>
10999         </permacrud>
11000     </class>
11001
11002     <class
11003         id="uvus"
11004         controller="open-ils.cstore open-ils.pcrud"
11005         oils_obj:fieldmapper="url_verify::url_selector"
11006         oils_persist:tablename="url_verify.url_selector"
11007         reporter:label="URL Verification URL Selector"
11008     >
11009         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11010             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11011             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11012                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11013             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11014         </fields>
11015
11016         <links>
11017             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11018             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11019         </links>
11020
11021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11022             <actions>
11023                 <create permission="URL_VERIFY">
11024                     <context link="session" field="owning_lib"/>
11025                 </create>
11026                 <retrieve permission="URL_VERIFY">
11027                     <context link="session" field="owning_lib"/>
11028                 </retrieve>
11029                 <update permission="URL_VERIFY">
11030                     <context link="session" field="owning_lib"/>
11031                 </update>
11032                 <delete permission="URL_VERIFY">
11033                     <context link="session" field="owning_lib"/>
11034                 </delete>
11035             </actions>
11036         </permacrud>
11037
11038     </class>
11039
11040     <class
11041         id="uvu"
11042         controller="open-ils.cstore open-ils.pcrud"
11043         oils_obj:fieldmapper="url_verify::url"
11044         oils_persist:tablename="url_verify.url"
11045         reporter:label="URL Verification URL"
11046     >
11047         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11048             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11049                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11050                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11051                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11052                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11053             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11054             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11055             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11056             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11057             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11058             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11059             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11060             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11061             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11062             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11063             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11064             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11065             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11066         </fields>
11067
11068         <links>
11069             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11070             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11071             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11072             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11073             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11074         </links>
11075
11076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11077             <actions>
11078                 <create permission="URL_VERIFY">
11079                     <context link="session" field="owning_lib"/>
11080                 </create>
11081                 <retrieve permission="URL_VERIFY">
11082                     <context link="session" field="owning_lib"/>
11083                 </retrieve>
11084                 <update permission="URL_VERIFY">
11085                     <context link="session" field="owning_lib"/>
11086                 </update>
11087                 <delete permission="URL_VERIFY">
11088                     <context link="session" field="owning_lib"/>
11089                 </delete>
11090             </actions>
11091         </permacrud>
11092
11093     </class>
11094
11095     <class
11096         id="uvva"
11097         controller="open-ils.cstore open-ils.pcrud"
11098         oils_obj:fieldmapper="url_verify::verification_attempt"
11099         oils_persist:tablename="url_verify.verification_attempt"
11100         reporter:label="URL Verification Attempt"
11101     >
11102         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11103             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11104                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11105                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11106             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11107             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11108         </fields>
11109
11110         <links>
11111             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11112             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11113         </links>
11114
11115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11116             <actions>
11117                 <create permission="URL_VERIFY">
11118                     <context link="session" field="owning_lib"/>
11119                 </create>
11120                 <retrieve permission="URL_VERIFY">
11121                     <context link="session" field="owning_lib"/>
11122                 </retrieve>
11123                 <update permission="URL_VERIFY">
11124                     <context link="session" field="owning_lib"/>
11125                 </update>
11126                 <delete permission="URL_VERIFY">
11127                     <context link="session" field="owning_lib"/>
11128                 </delete>
11129             </actions>
11130         </permacrud>
11131
11132     </class>
11133
11134     <class
11135         id="uvuv"
11136         controller="open-ils.cstore open-ils.pcrud"
11137         oils_obj:fieldmapper="url_verify::url_verification"
11138         oils_persist:tablename="url_verify.url_verification"
11139         reporter:label="URL Verification"
11140     >
11141         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11142             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11143                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11144                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11145             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11146             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11147             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11148             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11149                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11150         </fields>
11151
11152         <links>
11153             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11154             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11155             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11156         </links>
11157
11158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11159             <actions>
11160                 <create permission="URL_VERIFY">
11161                     <context link="attempt" jump="session" field="owning_lib"/>
11162                 </create>
11163                 <retrieve permission="URL_VERIFY">
11164                     <context link="attempt" jump="session" field="owning_lib"/>
11165                 </retrieve>
11166                 <update permission="URL_VERIFY">
11167                     <context link="attempt" jump="session" field="owning_lib"/>
11168                 </update>
11169                 <delete permission="URL_VERIFY">
11170                     <context link="attempt" jump="session" field="owning_lib"/>
11171                 </delete>
11172             </actions>
11173         </permacrud>
11174
11175     </class>
11176
11177         <class
11178                 id="cfdi"
11179                 controller="open-ils.cstore open-ils.pcrud"
11180                 oils_obj:fieldmapper="config::filter_dialog_interface"
11181                 oils_persist:tablename="config.filter_dialog_interface"
11182                 reporter:label="FilterDialog Interface">
11183                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11184                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11185                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11186                 </fields>
11187                 <links>
11188                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11189                 </links>
11190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11191                         <actions>
11192                                 <retrieve />
11193                         </actions>
11194                 </permacrud>
11195         </class>
11196
11197         <class
11198                 id="cfdfs"
11199                 controller="open-ils.cstore open-ils.pcrud"
11200                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11201                 oils_persist:tablename="config.filter_dialog_filter_set"
11202                 reporter:label="FilterDialog Filter Set">
11203                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11204                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11205                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11206                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11207                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11208                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11209                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11210                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11211                 </fields>
11212                 <links>
11213                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11214                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11215                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11216                 </links>
11217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11218                         <actions>
11219                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11220                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11221                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11222                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11223                         </actions>
11224                 </permacrud>
11225
11226         </class>
11227
11228         <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">
11229                 <fields oils_persist:primary="code">
11230                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11231                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11232                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11233                 </fields>
11234                 <links/>
11235                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11236                         <actions>
11237                                 <retrieve/>
11238                         </actions>
11239                 </permacrud>
11240         </class>
11241
11242         <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">
11243                 <oils_persist:source_definition>
11244
11245             SELECT  b.id,
11246                     MAX(dcp.edit_date) AS last_delete_date
11247              FROM   biblio.record_entry b
11248                     JOIN asset.call_number cn ON (cn.record = b.id)
11249                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11250              WHERE  NOT b.deleted
11251              GROUP BY b.id
11252              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11253
11254                 </oils_persist:source_definition>
11255                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11256                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11257                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11258                 </fields>
11259                 <links>
11260                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11261                 </links>
11262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11263                         <actions>
11264                                 <retrieve/>
11265                         </actions>
11266                 </permacrud>
11267         </class>
11268
11269         <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">
11270                 <oils_persist:source_definition>
11271
11272             -- -- 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.
11273             -- -- 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
11274             -- -- may not.
11275             -- SELECT
11276             --     bre.id AS bib_id,
11277             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11278             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11279             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11280             -- FROM (
11281                 SELECT
11282                     y.bre AS id,
11283                     COALESCE( x.copy_count, 0 ) AS copy_count,
11284                     y.hold_count AS hold_count,
11285                     (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
11286                 FROM (
11287                         SELECT
11288                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11289                             COUNT(*) AS hold_count
11290                         FROM action.hold_request h
11291                         WHERE
11292                             cancel_time IS NULL
11293                             AND fulfillment_time IS NULL
11294                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11295                         GROUP BY 1
11296                     )y LEFT JOIN (
11297                         SELECT 
11298                             (SELECT id
11299                                 FROM biblio.record_entry 
11300                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11301                             ) AS bre, 
11302                             COUNT(*) AS copy_count
11303                         FROM asset.copy
11304                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11305                         WHERE copy.holdable 
11306                             AND NOT copy.deleted 
11307                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11308                         GROUP BY 1
11309                     )x ON x.bre = y.bre
11310                 -- )z RIGHT JOIN (
11311                 --     SELECT id
11312                 --     FROM biblio.record_entry
11313                 --     WHERE NOT deleted
11314                 -- )bre ON (z.bib_id = bre.id)
11315                 
11316
11317                 </oils_persist:source_definition>
11318                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11319                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11320                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11321                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11322                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11323                 </fields>
11324                 <links>
11325                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11326                 </links>
11327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11328                         <actions>
11329                                 <retrieve/>
11330                         </actions>
11331                 </permacrud>
11332         </class>
11333
11334         <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">
11335                 <oils_persist:source_definition>
11336             SELECT *,
11337                 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,
11338                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11339             FROM
11340                 (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
11341                     FROM
11342                         action.hold_request ahr
11343                         JOIN reporter.hold_request_record rhrr USING (id)
11344                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11345                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11346                     WHERE
11347                         ahr.cancel_time IS NULL
11348                         AND ahr.fulfillment_time IS NULL
11349                     GROUP BY bib_record, pickup_lib
11350                 )x
11351                 JOIN
11352                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11353                     FROM
11354                         action.hold_request ahr
11355                         JOIN reporter.hold_request_record rhrr USING (id)
11356                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11357                     WHERE
11358                         ahr.cancel_time IS NULL
11359                         AND ahr.fulfillment_time IS NULL
11360                     GROUP BY bib_record
11361                 )y
11362                 USING (id)
11363                 </oils_persist:source_definition>
11364                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11365                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11366                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11367                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11368                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11369                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11370                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11371                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11372                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11373                 </fields>
11374                 <links>
11375                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11376                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11377                 </links>
11378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11379                         <actions>
11380                                 <retrieve/>
11381                         </actions>
11382                 </permacrud>
11383         </class>
11384
11385         <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) ">
11386                 <oils_persist:source_definition>
11387             WITH counts_at_ou AS (
11388                 SELECT  rhrr.bib_record AS id,
11389                         aou.id AS pickup_lib_or_desc,
11390                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11391                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11392                   FROM  actor.org_unit aou
11393                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11394                         action.hold_request ahr
11395                         JOIN reporter.hold_request_record rhrr USING (id)
11396                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11397                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11398                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11399                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11400                         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
11401                   GROUP BY 1, 2
11402             )
11403             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11404                    y.holds_everywhere, y.copy_count_everywhere,
11405                 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,
11406                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11407             FROM counts_at_ou x
11408                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11409                     FROM
11410                         action.hold_request ahr
11411                         JOIN reporter.hold_request_record rhrr USING (id)
11412                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11413                     WHERE
11414                         ahr.cancel_time IS NULL
11415                         AND ahr.fulfillment_time IS NULL
11416                     GROUP BY bib_record
11417                 )y
11418                 USING (id)
11419                 </oils_persist:source_definition>
11420                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11421                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11422                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11423                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11424                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11425                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11426                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11427                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11428                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11429                 </fields>
11430                 <links>
11431                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11432                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11433                 </links>
11434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11435                         <actions>
11436                                 <retrieve/>
11437                         </actions>
11438                 </permacrud>
11439         </class>
11440
11441         <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">
11442                 <oils_persist:source_definition>
11443             SELECT
11444                 ac.id,
11445                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11446                 MAX(actac.xact_start) AS last_circ
11447             FROM asset.copy ac
11448                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11449             GROUP BY ac.id
11450
11451             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11452             --SELECT
11453             --    ac.id,
11454             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11455             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11456             --FROM asset.copy ac
11457             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11458             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11459             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11460                 </oils_persist:source_definition>
11461                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11462                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11463                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11464                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11465                 </fields>
11466                 <links>
11467                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11468                 </links>
11469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11470                         <actions>
11471                                 <retrieve/>
11472                         </actions>
11473                 </permacrud>
11474         </class>
11475
11476         <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">
11477                 <fields oils_persist:primary="id">
11478                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11479                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11480                 </fields>
11481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11482                         <actions>
11483                                 <retrieve/>
11484                         </actions>
11485                 </permacrud>
11486         </class>
11487
11488         <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">
11489                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11490                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11491                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11492                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11493                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11494                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11495                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11496                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11497                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11498                 </fields>
11499                 <links>
11500                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11501                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11502                 </links>
11503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11504                         <actions>
11505                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11506                                 <retrieve/>
11507                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11508                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11509                         </actions>
11510                 </permacrud>
11511         </class>
11512
11513         <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">
11514                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11515                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11516                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11517                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11518                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11519                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11520                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11521                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11522                 </fields>
11523                 <links>
11524                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11525                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11526                 </links>
11527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11528                         <actions>
11529                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11530                                 <retrieve/>
11531                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11532                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11533                         </actions>
11534                 </permacrud>
11535         </class>
11536
11537
11538         <!-- ********************************************************************************************************************* -->
11539         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11540         <!-- ********************************************************************************************************************* -->
11541         <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">
11542                 <fields oils_persist:primary="id">
11543                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11544                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11545                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11546                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11547                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11548                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11549                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11550                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11551                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11552                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11553                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11554                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11555                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11556                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11557                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11558                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11559                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11560                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11561                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11562                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11563                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11564                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11565                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11566                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11567                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11568                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11569                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11570                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11571                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11572                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11573                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11574                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11575                 </fields>
11576                 <links>
11577                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11578                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11579                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11580                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11581                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11582                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11583                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11584                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11585                 </links>
11586         </class>
11587
11588         <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">
11589                 <fields oils_persist:primary="id">
11590                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11591                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11592                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11593                 </fields>
11594                 <links>
11595                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11596                 </links>
11597         </class>
11598
11599         <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">
11600                 <fields oils_persist:primary="id">
11601                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11602                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11603                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11604                 </fields>
11605                 <links>
11606                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11607                 </links>
11608         </class>
11609
11610         <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">
11611                 <fields oils_persist:primary="id">
11612                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11613
11614                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11615                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11616                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11617
11618                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11619                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11620                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11621
11622                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11623                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11624
11625                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11626                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11627                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11628
11629                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11630                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11631
11632                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11633                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11634                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11635
11636                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11637                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11638                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11639
11640                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11641                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11642                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11643                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11644
11645                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11646                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11647
11648                 </fields>
11649                 <links>
11650                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11651                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11652                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11653                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11654                 </links>
11655         </class>
11656
11657         <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">
11658                 <oils_persist:source_definition>
11659
11660             SELECT
11661                 po.ordering_agency AS ordering_agency,
11662                 po.id AS purchase_order,
11663                 li.id AS lineitem,
11664                 lid.id AS lineitem_detail,
11665                 cpa.id AS claim_policy_action
11666             FROM
11667                 acq.lineitem_detail lid
11668                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11669                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11670                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11671                 JOIN acq.claim_policy_action cpa ON (
11672                     cpa.claim_policy = cp.id
11673
11674                     -- we only care about claim policy actions whose claim
11675                     -- interval we'd reached or exceeded
11676                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11677
11678                     -- filter out all claim policy actions where claim events
11679                     -- have occurred on or after the action's action_interval
11680                     AND NOT EXISTS (
11681                         SELECT 1
11682                         FROM
11683                             acq.claim_event evt
11684                             JOIN acq.claim claim ON (
11685                                 claim.id = evt.claim
11686                                 AND claim.lineitem_detail = lid.id
11687                             )
11688                         WHERE
11689                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11690                     )
11691                 )
11692             WHERE
11693                 lid.cancel_reason IS NULL
11694                 AND li.cancel_reason IS NULL -- belt/suspenders
11695                 AND po.cancel_reason IS NULL -- belt/suspenders
11696                 AND lid.recv_time IS NULL
11697                 AND po.state = 'on-order'
11698             ORDER BY 1, 2, 3, 4, 5
11699
11700                 </oils_persist:source_definition>
11701                 <fields>
11702                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11703                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11704                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11705                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11706                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11707                 </fields>
11708                 <links>
11709                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11710                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11711                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11712                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11713                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11714                 </links>
11715         </class>
11716         <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">
11717                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11718                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11719                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11720                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11721                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11722                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11723                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11724                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11725                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11726                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11727                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11728                 </fields>
11729                 <links>
11730                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11731                 </links>
11732     </class>
11733         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11734                 <oils_persist:source_definition>
11735             SELECT * FROM acq.lineitem_summary 
11736                                 WHERE item_count > (invoice_count + cancel_count)
11737         </oils_persist:source_definition>
11738                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11739                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11740                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11741                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11742                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11743                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11744                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11745                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11746                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11747                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11748                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11749                 </fields>
11750                 <links>
11751                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11752                 </links>
11753     </class>
11754         <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">
11755                 <oils_persist:source_definition>
11756
11757                         SELECT  t.*
11758                           FROM  action.transit_copy t
11759                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11760                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11761                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11762
11763                 </oils_persist:source_definition>
11764                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11765                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11766                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11767                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11768                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11769                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11770                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11771                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11772                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11773                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11774                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11775                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11776                 </fields>
11777                 <links>
11778                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11779                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11780                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11781                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11782                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11783                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11784                 </links>
11785         </class>
11786
11787     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11788                 <oils_persist:source_definition>
11789
11790         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11791                 SELECT
11792                         cp.id as copy,
11793                         COUNT(circ.id),
11794                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11795                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11796                 FROM
11797                         asset.copy cp
11798                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11799                 GROUP BY 1, 3, 4
11800                 UNION ALL
11801                 SELECT
11802                         cp.id as copy,
11803                         COUNT(circ.id),
11804                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11805                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11806                 FROM
11807                         asset.copy cp
11808                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11809                 GROUP BY 1, 3, 4
11810                 UNION ALL
11811                 SELECT
11812                         id as copy,
11813                         circ_count,
11814                         -1 AS year,
11815                         false as is_renewal
11816                 FROM
11817                         extend_reporter.legacy_circ_count
11818         )x GROUP BY 1, 3, 4
11819
11820                 </oils_persist:source_definition>
11821         <fields>
11822             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11823             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11824             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11825             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11826         </fields>
11827                 <links>
11828                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11829                 </links>
11830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11831                         <actions>
11832                                 <retrieve/>
11833                         </actions>
11834                 </permacrud>
11835     </class>
11836
11837         <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">
11838                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11839                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11840                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11841                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11842                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11843                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11844                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11845                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11846                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11847                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11848                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11849                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11850                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11851                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11852                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11853                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11854                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11855                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11856                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11857                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11858                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11859                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11860                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11861                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11862                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11863                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11864                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11865                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11866                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11867                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11868                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11869                 </fields>
11870                 <links>
11871                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11872                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11873                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11874                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11875                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11876                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11877                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11878                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11879                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11880                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11881                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11882                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11883                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11884                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11885                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11886                 </links>
11887         </class>
11888
11889     <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">
11890         <fields oils_persist:primary="id">
11891             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11892             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11893             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11894             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11895             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11896             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11897             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11898             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11899             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11900             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11901             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11902             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11903             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11904             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11905             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11906             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11907             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11908             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11909             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11910             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11911             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11912             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11913             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11914             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11915             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11916             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11917             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11918             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11919             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11920             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11921             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11922             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11923             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11924             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11925         </fields>
11926         <links>
11927             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11928             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11929             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11930             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11931             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11932             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11933             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11934             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11935         </links>
11936     </class>
11937
11938     <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">
11939         <fields oils_persist:primary="id">
11940             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11941             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11942             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11943             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11944         </fields>
11945         <links>
11946             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11947             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11948         </links>
11949     </class>
11950
11951     <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">
11952         <fields oils_persist:primary="owning_lib">
11953             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11954             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11955             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11956         </fields>
11957         <links>
11958             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11959         </links>
11960     </class>
11961
11962     <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">
11963         <fields oils_persist:primary="id">
11964             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11965             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11966             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11967             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11968             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11969         </fields>
11970         <links>
11971             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
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="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">
11978         <fields oils_persist:primary="circ_lib">
11979             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11980             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11981             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11982             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11983         </fields>
11984         <links>
11985             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11986             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11987         </links>
11988     </class>
11989
11990     <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">
11991         <fields oils_persist:primary="id">
11992             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11993             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11994             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11995             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11996             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11997         </fields>
11998         <links>
11999             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
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
12005     <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">
12006         <fields oils_persist:primary="home_ou">
12007             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12008             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12009             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12010             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12011         </fields>
12012         <links>
12013             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12014             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12015         </links>
12016     </class>
12017         <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">
12018                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12019                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12020                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12021                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12022                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12023                 </fields>
12024                 <links>
12025                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12026                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12027                 </links>
12028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12029                         <actions>
12030                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12031                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12032                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12033                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12034                         </actions>
12035                 </permacrud>
12036         </class>
12037         <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">
12038                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12039                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12040                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12041                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12042                 </fields>
12043                 <links>
12044                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12045                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12046                         </links>
12047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12048                 <actions>
12049                                 <create permission="ADMIN_ACQ_FUND_TAG">
12050                                         <context link="tag" field="owner"/>
12051                                 </create>
12052                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12053                                         <context link="tag" field="owner"/>
12054                                 </retrieve>
12055                                 <update permission="ADMIN_ACQ_FUND_TAG">
12056                                         <context link="tag" field="owner"/>
12057                                 </update>
12058                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12059                                         <context link="tag" field="owner"/>
12060                                 </delete>
12061                         </actions>
12062                 </permacrud>
12063         </class>
12064         <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">
12065                 <oils_persist:source_definition><![CDATA[
12066                 SELECT
12067                         poi.purchase_order AS purchase_order,
12068                         ii.invoice AS invoice,
12069                         NULL AS lineitem,
12070                         poi.id AS po_item,
12071                         NULL AS picklist
12072                 FROM
12073                         acq.po_item poi
12074                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12075                 UNION SELECT
12076                         jub.purchase_order AS purchase_order,
12077                         ie.invoice AS invoice,
12078                         jub.id AS lineitem,
12079                         NULL AS po_item,
12080                         jub.picklist AS picklist
12081                 FROM
12082                         acq.lineitem jub
12083                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12084                 UNION SELECT
12085                         ii.purchase_order AS purchase_order,
12086                         ii.invoice AS invoice,
12087                         NULL AS lineitem,
12088                         NULL AS po_item,
12089                         NULL AS picklist
12090                 FROM
12091                         acq.invoice_item ii
12092                 WHERE ii.po_item IS NULL
12093                 UNION SELECT
12094                         ie.purchase_order AS purchase_order,
12095                         ie.invoice AS invoice,
12096                         NULL AS lineitem,
12097                         NULL AS po_item,
12098                         NULL AS picklist
12099                 FROM
12100                         acq.invoice_entry ie
12101                 WHERE ie.lineitem IS NULL
12102                 UNION SELECT
12103                         NULL AS purchase_order,
12104                         NULL AS invoice,
12105                         jub.id AS lineitem,
12106                         NULL AS po_item,
12107                         jub.picklist AS picklist
12108                 FROM
12109                         acq.lineitem jub
12110                 WHERE jub.purchase_order IS NULL
12111                 ]]></oils_persist:source_definition>
12112                 <fields>
12113                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12114                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12115                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12116                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12117                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12118                 </fields>
12119                 <links>
12120                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12121                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12122                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12123                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12124                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12125                 </links>
12126         </class>
12127         <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">
12128                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12129                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12130                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12131                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12132                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12133                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12134                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12135                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12136                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12137                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12138                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12139                 </fields>
12140                 <links>
12141                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12142                 </links>
12143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12144                         <actions>
12145                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12146                                 <retrieve/>
12147                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12148                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12149                         </actions>
12150                 </permacrud>
12151         </class>
12152
12153         <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">
12154                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12156                         <field name="date_applied" reporter:datatype="timestamp"/>
12157                         <field name="org" reporter:datatype="org_unit"/>
12158                         <field name="original_value" reporter:datatype="text"/>
12159                         <field name="new_value" reporter:datatype="text"/>
12160                         <field name="field_name" reporter:datatype="link"/>
12161                 </fields>
12162                 <links>
12163                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12164                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12165                 </links>
12166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12167                         <actions>
12168                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12169                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12170                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12171                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12172                         </actions>
12173                 </permacrud>
12174         </class>
12175         <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">
12176                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12177                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12178                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12179                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12180                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12181                 </fields>
12182                 <links>
12183                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12184                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12185                 </links>
12186         </class>
12187         <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">
12188                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12189                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12190                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12191                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12192                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12193                 </fields>
12194                 <links>
12195                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12196                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12197                 </links>
12198         </class>
12199         <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">
12200                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12201                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12202                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12203                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12204                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12205                 </fields>
12206                 <links>
12207                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12208                 </links>
12209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12210                         <actions>
12211                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12212                                 <retrieve/>
12213                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12214                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12215                         </actions>
12216                 </permacrud>
12217         </class>
12218         <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">
12219                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12220                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12221                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12222                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12223                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12224                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12225                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12226                 </fields>
12227                 <links>
12228                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12229                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12230                 </links>
12231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12232                         <actions>
12233                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12234                                 <retrieve/>
12235                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12236                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12237                         </actions>
12238                 </permacrud>
12239         </class>
12240         <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">
12241                 <fields oils_persist:primary="code">
12242                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12243                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12244                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12245                 </fields>
12246                 <links>
12247                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12248                 </links>
12249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12250                         <actions>
12251                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12252                                 <retrieve/>
12253                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12254                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12255                         </actions>
12256                 </permacrud>
12257         </class>
12258         <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">
12259                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12260                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12261                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12262                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12263                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12264                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12265                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12266                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12267                 </fields>
12268                 <links>
12269                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12270                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12271                 </links>
12272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12273                         <actions>
12274                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12275                                 <retrieve/>
12276                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12277                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12278                         </actions>
12279                 </permacrud>
12280         </class>
12281         <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">
12282                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12283                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12284                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12285                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12286                 </fields>
12287                 <links>
12288                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12289                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12290                 </links>
12291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12292                         <actions>
12293                                 <create permission="UPDATE_COPY">
12294                     <context link="copy" field="circ_lib"/>
12295                 </create>
12296                                 <retrieve/>
12297                                 <update permission="UPDATE_COPY">
12298                     <context link="copy" field="circ_lib"/>
12299                 </update>
12300                                 <delete permission="UPDATE_COPY">
12301                     <context link="copy" field="circ_lib"/>
12302                 </delete>
12303                         </actions>
12304                 </permacrud>
12305         </class>
12306         <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">
12307         <oils_persist:source_definition>
12308         SELECT ahcm.target_copy AS id,count(*) AS count
12309          FROM
12310          action.hold_request ahr,
12311          action.hold_copy_map ahcm
12312          WHERE
12313          ahr.cancel_time IS NULL AND
12314          ahr.fulfillment_time IS NULL AND
12315          ahr.capture_time IS NULL AND
12316          ahr.id = ahcm.hold
12317          GROUP BY ahcm.target_copy
12318         </oils_persist:source_definition>
12319         <fields oils_persist:primary="id">
12320             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12321             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12322         </fields>
12323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12324             <actions>
12325                <retrieve/>
12326             </actions>
12327         </permacrud>
12328         </class>
12329
12330         <!-- ********************************************************************************************************************* -->
12331
12332 </IDL>
12333
12334 <!--
12335     vim:noet:ts=4:sw=4:
12336 -->