]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1638299: add new authority.thesaurus columns to IDL
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
809                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
811                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
812                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
813                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
814                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
815                 </fields>
816                 <links>
817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
819                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
821                 </links>
822         </class>
823
824     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
825         <fields oils_persist:primary="name">
826             <field reporter:label="Name" name="name" reporter:datatype="text"/>
827             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
828             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
829             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
830         </fields>
831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
832             <actions>
833                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
834                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837             </actions>
838         </permacrud>
839     </class>
840
841     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
842         <fields oils_persist:primary="id">
843             <field reporter:label="ID" name="id" reporter:datatype="id"/>
844             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
847             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
848         </fields>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
854                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
860                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
862                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
863                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
864                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
865                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
866                 </fields>
867                 <links>
868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
869                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
870                 </links>
871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872             <actions>
873                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
874                 <retrieve/>
875                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
876                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877             </actions>
878         </permacrud>
879         </class>
880
881         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
882                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
883                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
884                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
885                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
886         </fields>
887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888             <actions>
889                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
890                 <retrieve/>
891                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
892                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
893             </actions>
894         </permacrud>
895         </class>
896
897         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
899                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
900                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
901                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
902                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
903                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
906                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
907                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
908                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
909                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
910         </fields>
911                 <links>
912                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
914         </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
918                 <retrieve/>
919                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
920                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
928                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
929                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
934                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
935                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
936                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
937         </fields>
938                 <links>
939                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
941         </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
945                 <retrieve/>
946                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
947                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
948             </actions>
949         </permacrud>
950         </class>
951
952         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
953                 <fields oils_persist:primary="name">
954                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
955                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
957                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
958                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
959                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
960                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
961                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
962                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
963                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
964                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
965                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
966                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
967                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
968                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
969                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
970                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
971                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
972                 </fields>
973                 <links>
974                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
975                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <create permission="ADMIN_SVF" global_required="true"/>
980                 <retrieve/>
981                 <update permission="ADMIN_SVF" global_required="true"/>
982                 <delete permission="ADMIN_SVF" global_required="true"/>
983             </actions>
984         </permacrud>
985         </class>
986
987         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
988                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
990                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
992             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
993                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1001                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1007                 <fields oils_persist:primary="coded_value">
1008                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1009                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1010                 </fields>
1011                 <links>
1012                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1013                 </links>
1014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1015             <actions>
1016                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1017                 <retrieve/>
1018                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1019                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1020             </actions>
1021         </permacrud>
1022         </class>
1023
1024         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1025                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1026                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1027                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1028                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1029                 </fields>
1030                 <links>
1031                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1032                 </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <retrieve/>
1036             </actions>
1037         </permacrud>
1038         </class>
1039
1040
1041         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1043                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1044                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1045                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1046                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1047                 </fields>
1048                 <links>
1049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1050                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1051                 </links>
1052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053             <actions>
1054                 <retrieve/>
1055             </actions>
1056         </permacrud>
1057         </class>
1058
1059
1060         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1061                 <fields oils_persist:primary="source">
1062                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1063                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1064                 </fields>
1065                 <links>
1066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1067                 </links>
1068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069             <actions>
1070                 <retrieve/>
1071             </actions>
1072         </permacrud>
1073         </class>
1074
1075         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1076                 <fields>
1077                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1078                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1079                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1080                 </fields>
1081                 <links>
1082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1083                 </links>
1084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085             <actions>
1086                 <retrieve/>
1087             </actions>
1088         </permacrud>
1089         </class>
1090
1091         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1092                 <fields oils_persist:primary="id">
1093                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1094                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1107                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1109                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1110                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1111                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1112                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1113                 </fields>
1114                 <links>
1115                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1116                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1117                 </links>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1123                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1130                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1131                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1132                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1133                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1134                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1136                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1137             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1138             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1139             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1140                 </fields>
1141                 <links>
1142                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1143                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1148                 <retrieve/>
1149                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1150                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1157                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1158                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1159                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1160                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1161                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1162                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1163                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1164                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1165                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1166                 </fields>
1167                 <links>
1168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1169                 </links>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1173                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1181         <fields oils_persist:primary="name">
1182             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1183             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1185             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1186             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1187             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1188             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1189             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1190             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1191             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1192         </fields>
1193         <links>
1194             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1195             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1202                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205     </class>
1206
1207     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1208         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1209             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1210             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1211             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1212             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1213             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1214             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1215             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1216         </fields>
1217         <links>
1218             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1219         </links>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1225                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228     </class>
1229
1230     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1231                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1232                         oils_persist:tablename="config.z3950_index_field_map" 
1233                         reporter:label="Z39.50 Index Field Map">
1234         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1235             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1236             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1237             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1238             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1239             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1241         </fields>
1242         <links>
1243             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1244             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1245             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1246         </links>
1247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248             <actions>
1249                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <retrieve/>
1251                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1252                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253             </actions>
1254         </permacrud>
1255     </class>
1256
1257
1258         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1260                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1263                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1264                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1265                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                 </fields>
1267                 <links>
1268             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1269             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <retrieve/>
1274                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1275                         </actions>
1276                 </permacrud>
1277         </class>
1278
1279         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1280                 <fields oils_persist:primary="key">
1281                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1282                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1284                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1285                 </fields>
1286                 <links/>
1287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1288                         <actions>
1289                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1290                                 <retrieve/>
1291                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1292                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1298                 <fields oils_persist:primary="module">
1299                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1301                 </fields>
1302                 <links/>
1303         </class>
1304
1305         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1306                 <fields oils_persist:primary="module">
1307                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1309                 </fields>
1310                 <links/>
1311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1312                         <actions>
1313                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1314                                 <retrieve/>
1315                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1316                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1317                         </actions>
1318                 </permacrud>
1319         </class>
1320
1321         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1322                 <fields oils_persist:primary="module">
1323                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1325                 </fields>
1326                 <links/>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1330                                 <retrieve/>
1331                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1332                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1338                 <fields oils_persist:primary="module">
1339                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1341                 </fields>
1342                 <links/>
1343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1344                         <actions>
1345                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1346                                 <retrieve/>
1347                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1348                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1349                         </actions>
1350                 </permacrud>
1351         </class>
1352
1353         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1354                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1355                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1356                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1357                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1358                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1359                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1360                 </fields>
1361                 <links>
1362                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1363                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1364                 </links>
1365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1366                         <actions>
1367                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1368                     <context link="event_def" field="owner"/>
1369                 </create>
1370                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1371                     <context link="event_def" field="owner"/>
1372                 </retrieve>
1373                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1374                     <context link="event_def" field="owner"/>
1375                 </update>
1376                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1377                     <context link="event_def" field="owner"/>
1378                 </delete>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1385                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1387                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1388                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1389                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1390                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1391                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1392                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1393                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1394                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1396                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1398                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1399                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1400                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1402                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1403                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1404                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1405                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1406                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1407                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1408                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1410                 </fields>
1411                 <links>
1412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1413                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1414                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1415                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1416                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1418                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1419                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1420                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1421                 </links>
1422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423                         <actions>
1424                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1428                         </actions>
1429                 </permacrud>
1430         </class>
1431
1432         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1434                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1435                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1436                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1437                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1443                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1444                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1445                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1446                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1447                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1448                 </fields>
1449                 <links>
1450                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1451                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1454                 </links>
1455         </class>
1456
1457         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1459                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1460                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1461                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1462                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1463                 </fields>
1464                 <links>
1465                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1470                     <context link="event_def" field="owner"/>
1471                 </create>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1473                     <context link="event_def" field="owner"/>
1474                 </retrieve>
1475                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1476                     <context link="event_def" field="owner"/>
1477                 </update>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1479                     <context link="event_def" field="owner"/>
1480                 </delete>
1481                         </actions>
1482                 </permacrud>
1483         </class>
1484
1485         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1486                 <oils_persist:source_definition><![CDATA[
1487                 SELECT  atevdef.hook,
1488                         atevdef.name,
1489                         atevdef.reactor,
1490                         atev.id,
1491                         atev.event_def,
1492                         atev.add_time,
1493                         atev.run_time,
1494                         atev.start_time,
1495                         atev.update_time,
1496                         atev.complete_time,
1497                         atev.update_process,
1498                         atev.state,
1499                         atev.user_data,
1500                         atev.template_output,
1501                         atev.error_output,
1502                         atev.async_output,
1503                         targ_circ.id AS target_circ,
1504                         targ_ahr.id AS target_hold,
1505                         COALESCE(
1506                                 targ_circ.circ_lib,
1507                                 targ_ahr.pickup_lib
1508                         ) AS perm_lib
1509                 FROM action_trigger.event atev
1510                 JOIN action_trigger.event_definition atevdef ON
1511                         (atevdef.id = atev.event_def)
1512                 JOIN action_trigger.hook ath ON
1513                         (ath.key = atevdef.hook)
1514                 LEFT JOIN action.circulation targ_circ ON
1515                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1516                 LEFT JOIN action.hold_request targ_ahr ON
1517                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1518                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1874                 </fields>
1875                 <links>
1876                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1881                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1883                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1884                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1885                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1886                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1887                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1888                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1889             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1890                 </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899         </class>
1900
1901         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1903                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1904                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1905                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1906                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1907                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1909                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1910                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1911                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1917                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1918             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1919                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1920                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1921             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1922                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1923                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1925                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1926             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1927             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1928             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1929                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1930                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1931                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1932                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1933                 </fields>
1934                 <links>
1935                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1938                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1939                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1941                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1942                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1943                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1944                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1945                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1946                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1947                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1948                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1949             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1950                 </links>
1951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952             <actions>
1953                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1956                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1957             </actions>
1958         </permacrud>
1959         </class>
1960
1961     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1962         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1963             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1964             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1965             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1966         </fields>
1967         <links/>
1968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1969             <actions>
1970                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <retrieve/>
1972                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1973                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1974             </actions>
1975         </permacrud>
1976     </class>
1977
1978     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1979         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1980             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1981             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1982             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1983             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1984             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1985             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1986             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1987         </fields>
1988         <links>
1989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1990         </links>
1991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1992             <actions>
1993                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <retrieve/>
1995                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1996                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1997             </actions>
1998         </permacrud>
1999     </class>
2000
2001     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2002         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2003             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2004             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2005             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2006             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2007             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2008         </fields>
2009         <links>
2010             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2011             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2012         </links>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2016                     <context link="matchpoint" field="org_unit"/>
2017                 </create>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2020                     <context link="matchpoint" field="org_unit"/>
2021                 </update>
2022                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2023                     <context link="matchpoint" field="org_unit"/>
2024                 </delete>
2025             </actions>
2026         </permacrud>
2027     </class>
2028
2029     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2030         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2031             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2032             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2033             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2034         </fields>
2035         <links>
2036             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2037             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2038         </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2042                     <context link="limit_set" field="owning_lib"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2046                     <context link="limit_set" field="owning_lib"/>
2047                 </update>
2048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2049                     <context link="limit_set" field="owning_lib"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053     </class>
2054     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2055         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2056             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2057             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2058             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2059         </fields>
2060         <links>
2061             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2062             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2063         </links>
2064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2065             <actions>
2066                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="limit_set" field="owning_lib"/>
2068                 </create>
2069                 <retrieve/>
2070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2071                     <context link="limit_set" field="owning_lib"/>
2072                 </update>
2073                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2074                     <context link="limit_set" field="owning_lib"/>
2075                 </delete>
2076             </actions>
2077         </permacrud>
2078     </class>
2079
2080     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2081         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2082             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2083             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2084             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2085             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2086         </fields>
2087         <links>
2088             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2089             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2090         </links>
2091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092             <actions>
2093                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2094                     <context link="limit_set" field="owning_lib"/>
2095                 </create>
2096                 <retrieve/>
2097                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2098                     <context link="limit_set" field="owning_lib"/>
2099                 </update>
2100                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2101                     <context link="limit_set" field="owning_lib"/>
2102                 </delete>
2103             </actions>
2104         </permacrud>
2105     </class>
2106
2107         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2109                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2111                 </fields>
2112                 <links/>
2113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2114             <actions>
2115                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <retrieve/>
2117                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2118                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2119             </actions>
2120         </permacrud>
2121         </class>
2122
2123         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2125                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2128                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2129                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2130                 </fields>
2131                 <links>
2132                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2133                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2134                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="ADMIN_SURVEY">
2139                     <context link="survey" field="owner"/>
2140                 </create>
2141                 <retrieve/>
2142                 <update permission="ADMIN_SURVEY">
2143                     <context link="survey" field="owner"/>
2144                 </update>
2145                 <delete permission="ADMIN_SURVEY">
2146                     <context link="survey" field="owner"/>
2147                 </delete>
2148             </actions>
2149         </permacrud>
2150         </class>
2151         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="">
2153                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2154                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2155                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2156                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2157                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2158                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2159                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2160                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2161                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2162                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2163                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2164                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2165                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2166                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2167                 </fields>
2168                 <links>
2169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2170                 </links>
2171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2172                         <actions>
2173                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2174                                         <context link="usr" field="home_ou" />
2175                                 </retrieve>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2180                 <fields oils_persist:primary="id" oils_persist:sequence="">
2181                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2182                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2183                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2184                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2185                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2186                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2187                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2189                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2190                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2191                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2192                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2193                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2194                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2195                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2196                 </fields>
2197                 <links>
2198                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2199                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2200                 </links>
2201         </class>
2202         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2204                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2207                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2208                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2209                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2210                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2211                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2215                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2216                 </links>
2217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218                         <actions> <!-- created magically, so no create action -->
2219                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2220                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2221                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2222                         </actions>
2223                 </permacrud>
2224         </class>
2225         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2227                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2228                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2230                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2232                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2233                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2234                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2235                 </fields>
2236                 <links>
2237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2238                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2239                 </links>
2240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2241                         <actions> <!-- created magically, so no create action -->
2242                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2243                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2244                         </actions>
2245                 </permacrud>
2246         </class>
2247         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2249                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2251                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2253                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2260                 </links>
2261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262             <actions>
2263                 <create permission="UPDATE_USER" context_field="owner">
2264                     <context link="usr" field="home_ou"/>
2265                 </create>
2266                                 <!-- note: public notes are still accessible via API -->
2267                 <retrieve permission="UPDATE_USER">
2268                     <context link="usr" field="home_ou"/>
2269                                 </retrieve>
2270                 <update permission="UPDATE_USER">
2271                     <context link="usr" field="home_ou"/>
2272                                 </update>
2273                 <delete permission="UPDATE_USER">
2274                     <context link="usr" field="home_ou"/>
2275                                 </delete>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2281                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2282                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2283                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2284                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2286                 </fields>
2287                 <links>
2288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2289                 </links>
2290         </class>
2291         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2293                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2294                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2295                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2296                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2297                 </fields>
2298                 <links>
2299                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2300                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2301                 </links>
2302         </class>
2303         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2305                         <field name="field" reporter:datatype="link"/>
2306                         <field name="id" reporter:datatype="id" />
2307                         <field name="source" reporter:datatype="link"/>
2308                         <field name="value" reporter:datatype="text"/>
2309                 </fields>
2310                 <links>
2311                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2312                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2313                 </links>
2314         </class>
2315         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2316                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2317                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2318                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2319                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2320                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2321                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2322                 </fields>
2323                 <links>
2324                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2325                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2327                 </links>
2328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2329                         <actions>
2330                                 <retrieve/>
2331                         </actions>
2332                 </permacrud>
2333         </class>
2334         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2335                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2336                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2338                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2339                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2340                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2341                 </fields>
2342                 <links>
2343                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2344                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2345                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2346                 </links>
2347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348                         <actions>
2349                                 <retrieve/>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2355                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2356                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2357                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2358                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2360                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2361                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2362                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2363                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2365                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2370                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2372                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2373                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2375                 </links>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="TRANSIT_COPY" context_field="owner">
2379                     <context link="target_copy" field="circ_lib"/>
2380                 </create>
2381                 <retrieve/>
2382                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2383                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2384             </actions>
2385         </permacrud>
2386         </class>
2387         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2389                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2390                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2391                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2393                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2394                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2395                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2396                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2397                 </fields>
2398                 <links>
2399                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2400                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2401                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2403                 </links>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="ADMIN_SURVEY">
2407                     <context link="survey" field="owner"/>
2408                 </create>
2409                 <retrieve permission="VIEW_USER">
2410                     <context link="usr" field="home_ou"/>
2411                 </retrieve>
2412                 <update permission="ADMIN_SURVEY">
2413                     <context link="survey" field="owner"/>
2414                 </update>
2415                 <delete permission="ADMIN_SURVEY">
2416                     <context link="survey" field="owner"/>
2417                 </delete>
2418             </actions>
2419         </permacrud>
2420         </class>
2421         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2423                         <field name="bucket" />
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="target_copy" reporter:datatype="link"/>
2426                         <field name="create_time" reporter:datatype="timestamp" />
2427                         <field name="pos" reporter:datatype="int" />
2428                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2429                 </fields>
2430                 <links>
2431                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2432                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2433             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2434                 </links>
2435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2436                         <actions>
2437                                 <retrieve permission="ADMIN_COPY_BUCKET">
2438                     <context link="bucket" owning_lib="owning_lib"/>
2439                 </retrieve>
2440             </actions>
2441         </permacrud>
2442         </class>
2443         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2444                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2445                         <field name="id" reporter:datatype="id" />
2446                         <field name="item" reporter:datatype="link"/>
2447                         <field name="note" reporter:datatype="text" />
2448                 </fields>
2449                 <links>
2450                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2451                 </links>
2452         </class>
2453
2454         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2455                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2456                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2457                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2458                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2459                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2460                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2461                 </fields>
2462                 <links>
2463                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2464                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2465                 </links>
2466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2467                         <actions>
2468                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2469                                 <retrieve/>
2470                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2471                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2472                         </actions>
2473                 </permacrud>
2474         </class>
2475
2476         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2478                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2479                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2480                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2481                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2482                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2483                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2484                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2485                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2486                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2487                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2488                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2489                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2490                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2491                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2492                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2493                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2494                 </fields>
2495                 <links>
2496                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2497                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2498                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2499                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2500                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2501                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2502                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2503                 </links>
2504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2505                         <actions>
2506                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2507                                 <retrieve/>
2508                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2509                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2510                         </actions>
2511                 </permacrud>
2512         </class>
2513
2514         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2516                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2517                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2518                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2519                 </fields>
2520                 <links>
2521                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2522                 </links>
2523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2524                         <actions>
2525                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2526                                 <retrieve/>
2527                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2528                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2529                         </actions>
2530                 </permacrud>
2531         </class>
2532
2533         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2535                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2536                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2537                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2541                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2542                 </links>
2543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544                         <actions>
2545                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2546                                 <retrieve/>
2547                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2548                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2549                         </actions>
2550                 </permacrud>
2551         </class>
2552
2553         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2554                 <fields oils_persist:primary="code">
2555                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2556                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2557                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2558                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2559                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2560                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2561                 </fields>
2562                 <links>
2563                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2564                 </links>
2565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2566                         <actions>
2567                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2568                                 <retrieve/>
2569                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2570                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2571                         </actions>
2572                 </permacrud>
2573         </class>
2574
2575         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2576                 <fields oils_persist:primary="code">
2577                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2578                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2579                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2580                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2581                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2582                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2583                 </fields>
2584                 <links>
2585                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2586                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2587                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2588                 </links>
2589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2590                         <actions>
2591                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2592                                 <retrieve/>
2593                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2594                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2595                         </actions>
2596                 </permacrud>
2597         </class>
2598
2599     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2600         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2601             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2602             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2603             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2604         </fields>
2605         <links>
2606             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2607             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2608         </links>
2609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2610             <actions>
2611                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2612                 <retrieve/>
2613                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2614                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2615             </actions>
2616         </permacrud>
2617     </class>
2618
2619         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2620                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2621                         <field name="active" reporter:datatype="bool"/>
2622                         <field name="create_date" reporter:datatype="timestamp"/>
2623                         <field name="creator" />
2624                         <field name="deleted" reporter:datatype="bool"/>
2625                         <field name="edit_date" reporter:datatype="timestamp"/>
2626                         <field name="editor" />
2627                         <field name="id" reporter:datatype="id" />
2628                         <field name="last_xact_id" />
2629                         <field name="marc" />
2630                         <field name="source" />
2631                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2632                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2633                         <field name="heading" />
2634                         <field name="simple_heading" />
2635                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2636                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2637                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2638                 </fields>
2639                 <links>
2640                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2641                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2642                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2643                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2644                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2645                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2646                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2647                 </links>
2648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2649                         <actions>
2650                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2651                                 <retrieve/>
2652                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2653                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2654                         </actions>
2655                 </permacrud>
2656         </class>
2657         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2658                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2659                         <field name="char_encoding" />
2660                         <field name="id" />
2661                         <field name="record" />
2662                         <field name="record_status" />
2663                         <field name="thesaurus" />
2664                 </fields>
2665                 <links>
2666                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2667                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2668                 </links>
2669         </class>
2670         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2672                         <field name="id" reporter:datatype="id" />
2673                         <field name="bib" reporter:datatype="link" />
2674                         <field name="authority" reporter:datatype="link" />
2675                 </fields>
2676                 <links>
2677                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2678                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2679                 </links>
2680         </class>
2681         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2682                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2683                         <field name="id" reporter:datatype="id" />
2684                         <field name="record" reporter:datatype="link" />
2685                         <field name="atag" reporter:datatype="link" />
2686                         <field name="value" reporter:datatype="text" />
2687                 </fields>
2688                 <links>
2689                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2690                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2691                 </links>
2692         </class>
2693
2694         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2695                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2696                         <field name="id" reporter:datatype="id" />
2697                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2698                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2699                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2700                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2701                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2702                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2703                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2704                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2705                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2706                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2707                 </fields>
2708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2709                         <actions>
2710                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2711                                 <retrieve/>
2712                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2713                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2714                         </actions>
2715                 </permacrud>
2716         </class>
2717
2718         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
2719                 <fields oils_persist:primary="code" oils_persist:sequence="">
2720                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2721                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2722                 </fields>
2723                 <links/>
2724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2725             <actions>
2726                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2727                 <retrieve/>
2728                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2729                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2730             </actions>
2731         </permacrud>
2732         </class>
2733         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2734                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2735                         <field name="accepting_usr" />
2736                         <field name="amount" reporter:datatype="money" />
2737                         <field name="amount_collected" reporter:datatype="money" />
2738                         <field name="approval_code" reporter:datatype="text"/>
2739                         <field name="cash_drawer" reporter:datatype="link"/>
2740                         <field name="cc_number" reporter:datatype="text"/>
2741                         <field name="cc_order_number" reporter:datatype="text"/>
2742                         <field name="cc_processor" reporter:datatype="text"/>
2743                         <field name="id" reporter:datatype="id" />
2744                         <field name="note" reporter:datatype="text"/>
2745                         <field name="payment_ts" reporter:datatype="timestamp"/>
2746                         <field name="xact" reporter:datatype="link"/>
2747                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2748                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2749                 </fields>
2750                 <links>
2751                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2752                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2753                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2754                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2755                 </links>
2756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2757             <actions>
2758                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2759                     <context link="xact" jump="usr" field="home_ou"/>
2760                 </retrieve>
2761                         </actions>
2762                 </permacrud>
2763         </class>
2764         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
2765                 <fields oils_persist:primary="name">
2766                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2767                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2768                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2769                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2770                 </fields>
2771                 <links/>
2772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773             <actions>
2774                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2775                 <retrieve/>
2776                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2777                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2778             </actions>
2779         </permacrud>
2780         </class>
2781
2782         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2783                 <fields oils_persist:primary="alias">
2784                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2785                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2786                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2787                 </fields>
2788                 <links>
2789                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2790                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2791                 </links>
2792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2793             <actions>
2794                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2795                 <retrieve/>
2796                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2797                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2798             </actions>
2799         </permacrud>
2800         </class>
2801
2802         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2803                 <fields oils_persist:primary="name">
2804                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2805                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2806                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2807                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2808                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2809                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2810                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2811                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2812                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2813                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2814                 </fields>
2815                 <links>
2816                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2817                 </links>
2818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2819             <actions>
2820                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2821                 <retrieve/>
2822                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2823                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2824             </actions>
2825         </permacrud>
2826         </class>
2827
2828         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2829                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2830                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2831                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2832                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2833                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2834                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2835                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2836                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2837                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2838                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2839                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2840                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2841                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2842                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2843                 </fields>
2844                 <links>
2845                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2846                 </links>
2847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2848             <actions>
2849                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2850                 <retrieve/>
2851                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2852                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2853             </actions>
2854         </permacrud>
2855         </class>
2856         <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">
2857                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2858                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2859                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2860                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2861                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2862                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2863                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2864                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2865                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2866                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2867                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2868                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2869                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2870                 </fields>
2871                 <links>
2872                 </links>
2873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2874                         <actions>
2875                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2876                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2877                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2878                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2879                         </actions>
2880                 </permacrud>
2881         </class>
2882         <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">
2883                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2884                         <field name="id" reporter:datatype="id" />
2885                         <field name="name" reporter:datatype="text"/>
2886                         <field name="xpath" reporter:datatype="text"/>
2887                         <field name="format" reporter:datatype="link"/>
2888                         <field name="first_word" reporter:datatype="bool" />
2889                 </fields>
2890                 <links/>
2891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2892             <actions>
2893                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2894                 <retrieve/>
2895                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2896                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2897             </actions>
2898         </permacrud>
2899         </class>
2900         <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">
2901                 <fields oils_persist:primary="code" oils_persist:sequence="">
2902                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2903                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2904                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2905                 </fields>
2906                 <links/>
2907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2908             <actions>
2909                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2910                 <retrieve/>
2911                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2912                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2913             </actions>
2914         </permacrud>
2915         </class>
2916         <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">
2917                 <fields oils_persist:primary="code" oils_persist:sequence="">
2918                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2919                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2920                 </fields>
2921                 <links/>
2922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2923             <actions>
2924                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2925                 <retrieve/>
2926                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2927                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2928             </actions>
2929         </permacrud>
2930         </class>
2931     <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">
2932         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2933             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2934             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2935             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2936             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2937         </fields>
2938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2939             <actions>
2940                 <retrieve/>
2941             </actions>
2942         </permacrud>
2943     </class>
2944         <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">
2945                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2946                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2947                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2948                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2949                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2950                 </fields>
2951                 <links>
2952                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2953                 </links>
2954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2955             <actions>
2956                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2957                 <retrieve/>
2958                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2959                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2960             </actions>
2961         </permacrud>
2962         </class>
2963         <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">
2964                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2965                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2966                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2967                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2968                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2969                 </fields>
2970                 <links>
2971                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2972                 </links>
2973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2974             <actions>
2975                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2976                 <retrieve/>
2977                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2978                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2979             </actions>
2980         </permacrud>
2981         </class>
2982         <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">
2983                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2984                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2985                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2986                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2987                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2988                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2989                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2990                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2991                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2992                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2993                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2994                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2995                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2996                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2997                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2998                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2999                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3000                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3001                 </fields>
3002                 <links>
3003                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3004                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3005                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3006                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3007                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3008                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3009                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3010                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3011                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3012                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3013                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3014                 </links>
3015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3016             <actions>
3017                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3018                 <retrieve/>
3019                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3020                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3021             </actions>
3022         </permacrud>
3023         </class>
3024         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3025                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3026                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3027                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3028                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3029                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3030                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3031                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3032                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3033                 </fields>
3034                 <links>
3035                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3036                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3037         </links>
3038         </class>
3039         <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">
3040                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3041                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3042                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3043                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3044                 </fields>
3045                 <links>
3046                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3047                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3048                 </links>
3049         </class>
3050         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3051                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3052                         <field name="id" reporter:datatype="id" />
3053                         <field name="value" oils_persist:i18n="true" />
3054                 </fields>
3055                 <links/>
3056         </class>
3057         <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">
3058                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3059                         <field name="balance_owed" reporter:datatype="money" />
3060                         <field name="total_owed" reporter:datatype="money" />
3061                         <field name="total_paid" reporter:datatype="money" />
3062                         <field name="usr" reporter:datatype="link"/>
3063                 </fields>
3064                 <links>
3065                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3066         </links>
3067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3068             <actions>
3069                 <retrieve permission="VIEW_USER">
3070                     <context link="usr" field="home_ou"/>
3071                 </retrieve>
3072             </actions>
3073         </permacrud>
3074         </class>
3075         <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">
3076                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3077                         <field name="collector" />
3078                         <field name="enter_time" reporter:datatype="timestamp"/>
3079                         <field name="id" reporter:datatype="id" />
3080                         <field name="location" reporter:datatype="link"/>
3081                         <field name="usr" reporter:datatype="link"/>
3082                 </fields>
3083                 <links>
3084                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3085                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3086                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3087                 </links>
3088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3089             <actions>
3090                 <create permission="money.collections_tracker.create" context_field="location"/>
3091                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3092                 <delete permission="money.collections_tracker.create" context_field="location"/>
3093             </actions>
3094         </permacrud>
3095         </class>
3096         <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">
3097                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3098                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3099                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3100                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3101                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3102                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3103                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3104                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3105                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3106                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3107                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3108                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3109                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3110                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3111                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3112                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3113                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3114                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3115                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3116                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3117                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3118                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3119                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3120                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3121                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3122                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3123                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3124                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3125                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3126                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3127                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3128                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3129                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3130                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3131                 </fields>
3132                 <links>
3133                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3134                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3135                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3136                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3137                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3138                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3139                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3140                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3141                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3142                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3143                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3144                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3145                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3146                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3147                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3148                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3149                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3150                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3151                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3152                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3153                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3154                 </links>
3155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3156             <actions>
3157                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3158                 <retrieve/>
3159                 <update permission="UPDATE_MARC" global_required="true"/>
3160                 <!-- 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. -->
3161                 <delete permission="DELETE_RECORD" global_required="true"/>
3162             </actions>
3163         </permacrud>
3164         </class>
3165         <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">
3166                 <fields oils_persist:primary="id">
3167                         <field name="dow_0_close" />
3168                         <field name="dow_0_open" />
3169                         <field name="dow_1_close" />
3170                         <field name="dow_1_open" />
3171                         <field name="dow_2_close" />
3172                         <field name="dow_2_open" />
3173                         <field name="dow_3_close" />
3174                         <field name="dow_3_open" />
3175                         <field name="dow_4_close" />
3176                         <field name="dow_4_open" />
3177                         <field name="dow_5_close" />
3178                         <field name="dow_5_open" />
3179                         <field name="dow_6_close" />
3180                         <field name="dow_6_open" />
3181                         <field name="id" reporter:datatype="id" />
3182                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3183                 </fields>
3184                 <links>
3185                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3186                 </links>
3187         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3188             <actions>
3189                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3190                 <retrieve/>
3191                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3192                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3193             </actions>
3194         </permacrud>
3195         </class>
3196         <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">
3197                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3198                         <field name="id" reporter:datatype="id" />
3199                         <field name="record" reporter:datatype="link"/>
3200                         <field name="label" reporter:datatype="text"/>
3201                         <field name="label_sortkey" reporter:datatype="text"/>
3202                         <field name="deleted" reporter:datatype="bool"/>
3203                 </fields>
3204                 <links>
3205                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3206                 </links>
3207         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3208             <actions>
3209                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3210                 <retrieve/>
3211                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3212                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3213             </actions>
3214         </permacrud>
3215         </class>
3216         <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">
3217                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3218                         <field name="id" reporter:datatype="id" />
3219                         <field name="target_copy" reporter:datatype="link" />
3220                         <field name="part" reporter:datatype="link"/>
3221                 </fields>
3222                 <links>
3223                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3224                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3225                 </links>
3226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3227             <actions>
3228                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3229                 <retrieve/>
3230                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3231                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3232             </actions>
3233         </permacrud>
3234         </class>
3235         <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">
3236                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3237                         <field name="close_end" reporter:datatype="timestamp" />
3238                         <field name="close_start" reporter:datatype="timestamp" />
3239                         <field name="id" reporter:datatype="id" />
3240                         <field name="org_unit" reporter:datatype="org_unit"/>
3241                         <field name="reason" reporter:datatype="text"/>
3242                         <field name="full_day" reporter:datatype="bool"/>
3243                         <field name="multi_day" reporter:datatype="bool"/>
3244                 </fields>
3245                 <links>
3246                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3247                 </links>
3248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3249             <actions>
3250                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3251                 <retrieve/>
3252                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3253                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3254             </actions>
3255         </permacrud>
3256         </class>
3257         <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">
3258                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3259                         <field name="extended" reporter:datatype="interval"/>
3260                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3261                         <field name="max_renewals" reporter:datatype="int" />
3262                         <field name="name" reporter:datatype="text"/>
3263                         <field name="normal" reporter:datatype="interval"/>
3264                         <field name="shrt" reporter:datatype="interval"/>
3265                 </fields>
3266                 <links>
3267                 </links>
3268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3269             <actions>
3270                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3271                 <retrieve/>
3272                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3273                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3274             </actions>
3275         </permacrud>
3276         </class>
3277
3278         <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">
3279                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3280                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3281                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3282             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3283                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3284             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3285                 </fields>
3286                 <links>
3287             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3288                 </links>
3289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3290             <actions>
3291                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3292                 <retrieve/>
3293                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3294                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3295             </actions>
3296                 </permacrud>
3297         </class>
3298
3299         <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">
3300                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3301                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3302                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3303                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3304             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3305                 </fields>
3306                 <links>
3307                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3308                 </links>
3309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3310             <actions>
3311                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3312                 <retrieve/>
3313                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3314                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3315             </actions>
3316                 </permacrud>
3317         </class>
3318
3319         <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">
3320                 <fields oils_persist:primary="id" oils_persist:sequence="">
3321                         <field name="balance_owed" reporter:datatype="money"/>
3322                         <field name="id" reporter:datatype="id" />
3323                         <field name="last_billing_note" reporter:datatype="text"/>
3324                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3325                         <field name="last_billing_type" reporter:datatype="text"/>
3326                         <field name="last_payment_note" reporter:datatype="text"/>
3327                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3328                         <field name="last_payment_type" reporter:datatype="text"/>
3329                         <field name="total_owed" reporter:datatype="money"/>
3330                         <field name="total_paid" reporter:datatype="money"/>
3331                         <field name="usr" reporter:datatype="link"/>
3332                         <field name="xact_finish" reporter:datatype="timestamp" />
3333                         <field name="xact_start" reporter:datatype="timestamp" />
3334                         <field name="xact_type" reporter:datatype="text"/>
3335                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3336                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3337                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3338                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3339                         <field name="billing_location" reporter:datatype="link"/>
3340                 </fields>
3341                 <links>
3342                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3343                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3344                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3345                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3346                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3347                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3348                 </links>
3349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3350                         <actions>
3351                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3352                                         <context link="usr" field="home_ou" />
3353                                 </retrieve>
3354                         </actions>
3355                 </permacrud>
3356         </class>
3357         <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">
3358                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3359                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3360                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3361                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3362                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3363                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3364                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3365                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3366                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3367                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3368                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3369                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3370                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3371                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3372                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3373                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3374                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3375                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3376                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3377                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3378                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3379                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3380                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3381                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3382                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3383                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3384                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3385                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3386                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3387                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3388                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3389                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3390                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3391                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3392                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3393                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3394                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3395                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3396                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3397                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3398                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3399                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3400                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3401                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3402                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3403                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3404                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3405                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3406                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3407                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3408                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3409                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3410                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3411                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3412                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3413                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3414                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3415                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3416                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3417                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3418                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3419                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3420                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3421                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3422                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3423                 </fields>
3424                 <links>
3425                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3426                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3427                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3428                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3429                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3430                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3431                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3432                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3433                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3434                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3435                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3436                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3437                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3438                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3439                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3440                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3441                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3442                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3443                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3444                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3445                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3446                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3447                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3448                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3449                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3450                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3451                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3452                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3453                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3454                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3455                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3456                 </links>
3457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3458                         <actions>
3459                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3460                         </actions>
3461                 </permacrud>
3462         </class>
3463         <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">
3464                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3465                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3466                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3467                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3468                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3469                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3470                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3471                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3472                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3473         </fields>
3474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3475                         <actions>
3476                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3477                                 <retrieve/>
3478                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3479                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3480                         </actions>
3481                 </permacrud>
3482         </class>
3483         <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">
3484                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3485                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3486                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3487                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3488                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3489         </fields>
3490         <links>
3491                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3492                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3493                 </links>
3494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3495                         <actions>
3496                                 <retrieve permission="RUN_REPORTS">
3497                                         <context link="usr" field="home_ou" />
3498                                 </retrieve>
3499                         </actions>
3500                 </permacrud>
3501         </class>
3502         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3503                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3504                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3505                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3506                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3507                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3508                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3509                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3510         </fields>
3511         <links>
3512                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3513                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3514                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3515                 </links>
3516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3517                         <actions>
3518                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3519                                         <context link="usr" field="home_ou" />
3520                                         <context link="ws" field="owning_lib" />
3521                                 </retrieve>
3522                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3523                                         <context link="usr" field="home_ou" />
3524                                         <context link="ws" field="owning_lib" />
3525                                 </create>
3526                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3527                                         <context link="usr" field="home_ou" />
3528                                         <context link="ws" field="owning_lib" />
3529                                 </update>
3530                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3531                                         <context link="usr" field="home_ou" />
3532                                         <context link="ws" field="owning_lib" />
3533                                 </delete>
3534                         </actions>
3535                 </permacrud>
3536         </class>
3537         <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">
3538                 <fields oils_persist:primary="name">
3539                         <field name="name" reporter:datatype="text"/>
3540                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3541                 </fields>
3542                 <links/>
3543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3544                         <actions>
3545                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3546                                 <retrieve/>
3547                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3548                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3549                         </actions>
3550                 </permacrud>
3551         </class>
3552         <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">
3553                 <fields oils_persist:primary="name">
3554                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3555                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3556                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3557                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3558                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3559                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3560                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3561                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3562                 </fields>
3563                 <links>
3564                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3565                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3566                 </links>
3567                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3568                         <actions>
3569                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3570                                 <retrieve/>
3571                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3572                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3573                         </actions>
3574                 </permacrud>
3575         </class>
3576         <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">
3577                 <fields oils_persist:primary="name">
3578                         <field name="name" reporter:datatype="text"/>
3579                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3580                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3581                         <field name="datatype" reporter:datatype="text"/>
3582                         <field name="view_perm" reporter:datatype="link"/>
3583                         <field name="update_perm" reporter:datatype="link"/>
3584                         <field name="fm_class" reporter:datatype="text"/>
3585                         <field name="grp" reporter:datatype="link"/>
3586                 </fields>
3587                 <links>
3588                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3589                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3590                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3591                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3592                 </links>
3593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3594                         <actions>
3595                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3596                                 <retrieve/>
3597                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3598                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3599                         </actions>
3600                 </permacrud>
3601         </class>
3602         <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">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3604                         <field name="id" />
3605                         <field name="name"  reporter:datatype="text"/>
3606                         <field name="org_unit" reporter:datatype="org_unit"/>
3607                         <field name="value"  reporter:datatype="text"/>
3608                 </fields>
3609                 <links>
3610                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3611                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3612                 </links>
3613         </class>
3614         <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">
3615                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3616                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3617                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3618                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3619                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3620                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3621                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3622                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3623                 </fields>
3624                 <links>
3625                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3626                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3627                 </links>
3628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3629             <actions>
3630                 <create permission="CREATE_COPY_NOTE">
3631                     <context link="owning_copy" field="circ_lib"/>
3632                 </create>
3633                 <retrieve permission="VIEW_COPY_NOTES">
3634                     <context link="owning_copy" field="circ_lib"/>
3635                 </retrieve>
3636                 <update permission="UPDATE_COPY_NOTE">
3637                     <context link="owning_copy" field="circ_lib"/>
3638                 </update>
3639                 <delete permission="DELETE_COPY_NOTE">
3640                     <context link="owning_copy" field="circ_lib"/>
3641                 </delete>
3642             </actions>
3643         </permacrud>
3644         </class>
3645         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3646                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3647                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3648                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3649                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3650                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3651                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3652                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3653                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3654                 </fields>
3655                 <links>
3656                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3657                 </links>
3658         </class>
3659         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3660                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3661                         <field name="fingerprint"  reporter:datatype="text"/>
3662                         <field name="id" reporter:datatype="id" />
3663                         <field name="master_record" reporter:datatype="link"/>
3664                         <field name="mods"  reporter:datatype="text"/>
3665                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3666                 </fields>
3667                 <links>
3668                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3669                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3670                 </links>
3671         </class>
3672         <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">
3673                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3674                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3675                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3676                 </fields>
3677                 <links/>
3678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3679             <actions>
3680                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3681                 <retrieve/>
3682                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3683                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3684             </actions>
3685         </permacrud>
3686         </class>
3687         <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">
3688                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3689                         <field name="code"  reporter:datatype="text"/>
3690                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3691                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3692                 </fields>
3693                 <links/>
3694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3695             <actions>
3696                 <create permission="CREATE_PERM" global_required="true"/>
3697                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3698                 <update permission="UPDATE_PERM" global_required="true"/>
3699                 <delete permission="DELETE_PERM" global_required="true"/>
3700             </actions>
3701         </permacrud>
3702         </class>
3703         <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">
3704                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3705                         <field name="id" reporter:datatype="id" />
3706                         <field name="metarecord" reporter:datatype="link"/>
3707                         <field name="source" reporter:datatype="link"/>
3708                 </fields>
3709                 <links>
3710                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3711                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3712                 </links>
3713         </class>
3714         <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">
3715                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3716                         <field name="id" reporter:datatype="id" />
3717                         <field name="field" reporter:datatype="link"/>
3718                         <field name="source" reporter:datatype="link"/>
3719                         <field name="value"  reporter:datatype="text"/>
3720                 </fields>
3721                 <links>
3722                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3723                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3724                 </links>
3725         </class>
3726         <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">
3727                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3728                         <field name="id" reporter:datatype="id" />
3729                         <field name="value" reporter:datatype="text"/>
3730                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3731                 </fields>
3732                 <links>
3733                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3734                 </links>
3735         </class>
3736         <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">
3737                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3738                         <field name="id" reporter:datatype="id" />
3739                         <field name="entry" reporter:datatype="link"/>
3740                         <field name="def" reporter:datatype="link"/>
3741                         <field name="source" reporter:datatype="link"/>
3742                 </fields>
3743                 <links>
3744                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3745                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3746                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3747                 </links>
3748         </class>
3749         <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">
3750                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3751                         <field name="id" reporter:datatype="id" />
3752                         <field name="entry" reporter:datatype="link"/>
3753                         <field name="simple_heading" reporter:datatype="link"/>
3754                 </fields>
3755                 <links>
3756                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3757                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3758                 </links>
3759         </class>
3760         <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">
3761                 <oils_persist:source_definition>
3762                         SELECT * FROM metabib.author_field_entry
3763                                                 UNION ALL
3764                         SELECT * FROM metabib.keyword_field_entry
3765                                                 UNION ALL
3766                         SELECT * FROM metabib.identifier_field_entry
3767                                                 UNION ALL
3768                         SELECT * FROM metabib.title_field_entry
3769                                                 UNION ALL
3770                         SELECT * FROM metabib.subject_field_entry
3771                                                 UNION ALL
3772                         SELECT * FROM metabib.series_field_entry
3773                 </oils_persist:source_definition>
3774                 <fields>
3775                         <field name="field" reporter:datatype="link"/>
3776                         <field name="id" reporter:datatype="id" />
3777                         <field name="source" reporter:datatype="link"/>
3778                         <field name="value"  reporter:datatype="text"/>
3779                 </fields>
3780                 <links>
3781                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3782                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3783                 </links>
3784         </class>
3785         <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">
3786                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3787                         <field name="field" reporter:datatype="link"/>
3788                         <field name="id" reporter:datatype="id" />
3789                         <field name="source" reporter:datatype="link"/>
3790                         <field name="value"  reporter:datatype="text"/>
3791                 </fields>
3792                 <links>
3793                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3794                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3795                 </links>
3796         </class>
3797         <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">
3798                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3799                         <field name="accepting_usr" reporter:datatype="link"/>
3800                         <field name="amount" reporter:datatype="money" />
3801                         <field name="amount_collected" reporter:datatype="money" />
3802                         <field name="cash_drawer" reporter:datatype="link"/>
3803                         <field name="id" reporter:datatype="id" />
3804                         <field name="note"  reporter:datatype="text"/>
3805                         <field name="payment_ts" reporter:datatype="timestamp"/>
3806                         <field name="xact" reporter:datatype="link"/>
3807                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3808                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3809                 </fields>
3810                 <links>
3811                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3812                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3813                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3814                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3815                 </links>
3816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3817             <actions>
3818                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3819                     <context link="xact" jump="usr" field="home_ou"/>
3820                 </retrieve>
3821                         </actions>
3822                 </permacrud>
3823         </class>
3824         <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">
3825                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3826                         <field name="accepting_usr" reporter:datatype="link"/>
3827                         <field name="amount" reporter:datatype="money" />
3828                         <field name="amount_collected" reporter:datatype="money" />
3829                         <field name="id" reporter:datatype="id" />
3830                         <field name="note"  reporter:datatype="text"/>
3831                         <field name="payment_ts" reporter:datatype="timestamp"/>
3832                         <field name="xact" reporter:datatype="link"/>
3833                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3834                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3835                 </fields>
3836                 <links>
3837                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3838                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3839                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3840                 </links>
3841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3842             <actions>
3843                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3844                     <context link="xact" jump="usr" field="home_ou"/>
3845                 </retrieve>
3846                         </actions>
3847                 </permacrud>
3848         </class>
3849         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3850                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3851                         <field name="accepting_usr" reporter:datatype="link"/>
3852                         <field name="amount" reporter:datatype="money" />
3853                         <field name="amount_collected" reporter:datatype="money" />
3854                         <field name="id" reporter:datatype="id" />
3855                         <field name="note"  reporter:datatype="text"/>
3856                         <field name="payment_ts" reporter:datatype="timestamp"/>
3857                         <field name="xact" reporter:datatype="link"/>
3858                         <field name="billing" reporter:datatype="link"/>
3859                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3860                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3861                 </fields>
3862                 <links>
3863                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3864                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3865                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3866                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3867                 </links>
3868         </class>
3869         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3870                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3871                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3872                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3873                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3874                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3875                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3876                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3877                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3878                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3879                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3880                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3881                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3882                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3883                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3884                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3885                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3886                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3887                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3888                 </fields>
3889                 <links>
3890                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3891                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3892                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3893                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3894                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3895                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3896                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3897                 </links>
3898         </class>
3899
3900         <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">
3901                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3902                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3903                         <field name="name"  reporter:datatype="text"/>
3904                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3905                         <field name="block_list" reporter:datatype="text"/>
3906                         <field name="staff_alert" reporter:datatype="bool"/>
3907                         <field name="org_depth" reporter:datatype="int"/>
3908                         <field name="ignore_proximity" reporter:datatype="int"/>
3909                 </fields>
3910                 <links/>
3911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3912             <actions>
3913                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3914                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3915                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3916                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3917             </actions>
3918         </permacrud>
3919         </class>
3920         <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">
3921                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3922                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3923                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3924                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3925                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3926                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3927                 </fields>
3928                 <links>
3929                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3930                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3931                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3932         </links>
3933         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3934             <actions>
3935                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3936                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3937                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3938                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3939             </actions>
3940         </permacrud>
3941         </class>
3942         <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">
3943                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3944                         <field name="holdable" reporter:datatype="bool"/>
3945                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3946                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3947                         <field name="opac_visible" reporter:datatype="bool"/>
3948             <field name="copy_active" reporter:datatype="bool"/>
3949             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3950             <field name="is_available" reporter:datatype="bool"/>
3951                 </fields>
3952                 <links/>
3953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3954             <actions>
3955                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3956                 <retrieve/>
3957                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3958                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3959             </actions>
3960         </permacrud>
3961         </class>
3962         <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">
3963                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3964                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3965                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3966                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3967                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3968                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3969                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3970                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3971                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3972                 </fields>
3973                 <links>
3974                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3975                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3976                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3977                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3978                 </links>
3979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3980                         <actions>
3981                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3982                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3983                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3984                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3985                         </actions>
3986                 </permacrud>
3987         </class>
3988         <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">
3989                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3990                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3991                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3992                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3993                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3994                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3995                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3996                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3997                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3998                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3999                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4000                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4001                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4002                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4003                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4004                 </fields>
4005                 <links>
4006                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4007                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4008                 </links>
4009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4010                         <actions>
4011                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4012                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4013                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4014                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4015                         </actions>
4016                 </permacrud>
4017         </class>
4018         <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">
4019                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4020                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4021                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4022                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4023                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4024                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4025                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4026                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4027                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4028                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4029                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4030                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4031                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4032                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4033                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4034                 </fields>
4035                 <links>
4036                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4037                 </links>
4038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4039                         <actions>
4040                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4041                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4042                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4043                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4044                         </actions>
4045                 </permacrud>
4046         </class>
4047
4048
4049         <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">
4050                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4051                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4052                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4053                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4054                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4055                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4056                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4057                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4058                 </fields>
4059                 <links>
4060                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4061                 </links>
4062         </class>
4063
4064         <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">
4065                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4066                         <field name="call_number" />
4067                         <field name="create_date" reporter:datatype="timestamp"/>
4068                         <field name="creator" reporter:datatype="link"/>
4069                         <field name="id" reporter:datatype="id" />
4070                         <field name="pub" reporter:datatype="bool"/>
4071                         <field name="title"  reporter:datatype="text"/>
4072                         <field name="value"  reporter:datatype="text"/>
4073                 </fields>
4074                 <links>
4075                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4076                 </links>
4077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4078             <actions>
4079                 <create permission="CREATE_VOLUME_NOTE">
4080                     <context link="call_number" field="owning_lib"/>
4081                 </create>
4082                 <retrieve permission="VIEW_VOLUME_NOTES">
4083                     <context link="call_number" field="owning_lib"/>
4084                 </retrieve>
4085                 <update permission="UPDATE_VOLUME_NOTE">
4086                     <context link="call_number" field="owning_lib"/>
4087                 </update>
4088                 <delete permission="DELETE_VOLUME_NOTE">
4089                     <context link="call_number" field="owning_lib"/>
4090                 </delete>
4091             </actions>
4092         </permacrud>
4093         </class>
4094         <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">
4095                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4096                         <field name="create_date" reporter:datatype="timestamp"/>
4097                         <field name="creator" reporter:datatype="link"/>
4098                         <field name="edit_date" reporter:datatype="timestamp"/>
4099                         <field name="editor" reporter:datatype="link"/>
4100                         <field name="id" reporter:datatype="id" />
4101                         <field name="record" reporter:datatype="link"/>
4102                         <field name="value" reporter:datatype="text"/>
4103                 </fields>
4104                 <links>
4105                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4106                 </links>
4107         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4108             <actions>
4109                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4110                 <retrieve/>
4111                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4112                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4113             </actions>
4114         </permacrud>
4115         </class>
4116         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4117         <oils_persist:source_definition>
4118 SELECT  usr,
4119         SUM(
4120             CASE
4121                 WHEN (
4122                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4123                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4124                 ) THEN 1
4125                 ELSE 0
4126             END
4127         ) AS out,
4128
4129         SUM(
4130             CASE
4131                 WHEN (
4132                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4133                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4134                 ) THEN 1
4135                 ELSE 0
4136             END
4137         ) AS overdue,
4138
4139         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4140         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4141         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4142   FROM  action.circulation
4143   WHERE checkin_time IS NULL
4144   GROUP BY 1
4145         </oils_persist:source_definition>
4146         <fields oils_persist:primary="usr">
4147             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4148             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4149             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4150             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4151             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4152             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4153         </fields>
4154         <links>
4155             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4156         </links>
4157         </class>
4158         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4159         <oils_persist:source_definition>
4160 SELECT  usr,
4161         STRING_AGG(
4162             CASE
4163                 WHEN (
4164                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4165                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4166                 ) THEN id::TEXT
4167                 ELSE '0'
4168             END
4169         ,',') AS out,
4170
4171         STRING_AGG(
4172             CASE
4173                 WHEN (
4174                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4175                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4176                 ) THEN id::TEXT
4177                 ELSE '0'
4178             END
4179         ,',') AS overdue,
4180
4181         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4182         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4183         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4184   FROM  action.circulation
4185   WHERE checkin_time IS NULL
4186   GROUP BY 1
4187         </oils_persist:source_definition>
4188         <fields oils_persist:primary="usr">
4189             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4190             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4191             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4192             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4193             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4194             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4195         </fields>
4196         <links>
4197             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4198         </links>
4199         </class>
4200         <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">
4201                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4202                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4203                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4204                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4205                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4206                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4207                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4208                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4209                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4210                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4211                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4212                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4213                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4214                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4215                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4216                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4217                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4218                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4219                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4220                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4221                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4222                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4223                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4224                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4225                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4226                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4227                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4228                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4229                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4230                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4231                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4232                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4233                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4234                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4235                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4236                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4237                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4238                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4239                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4240                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4241                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4242                 </fields>
4243                 <links>
4244                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4245                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4246                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4247                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4248                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4249                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4250                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4251                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4252                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4253                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4254                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4255                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4256                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4257                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4258                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4259                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4260                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4261                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4262                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4263                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4264                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4265                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4266                 </links>
4267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4268                         <actions>
4269                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4270                         </actions>
4271                 </permacrud>
4272         </class>
4273         <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">
4274                 <fields>
4275                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4276                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4277                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4278                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4279                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4280                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4281                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4282                 </fields>
4283                 <links>
4284                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4285                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4286                 </links>
4287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4288                         <actions>
4289                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4290                         </actions>
4291                 </permacrud>
4292         </class>
4293         <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">
4294                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4295                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4296                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4297                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4298                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4299                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4300                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4301                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4302                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4303                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4304                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4305                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4306                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4307                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4308                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4309                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4310                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4311                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4312                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4313                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4314                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4315                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4316                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4317                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4318                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4319                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4320                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4321                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4322                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4323                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4324                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4325                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4326                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4327                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4328                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4329                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4330                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4331                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4332                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4333                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4334                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4335                 </fields>
4336                 <links>
4337                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4338                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4339                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4340                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4341                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4342                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4343                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4344                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4345                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4346                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4347                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4348                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4349                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4350                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4351                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4352                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4353                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4354                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4355                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4356                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4357                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4358                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4359                 </links>
4360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4361                         <actions>
4362                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4363                         </actions>
4364                 </permacrud>
4365         </class>
4366
4367         <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">
4368                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4369                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4370                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4371                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4372                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4373                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4374                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4375                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4376                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4377                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4378                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4379                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4380                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4381                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4382                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4383                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4384                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4385                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4386                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4387                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4388                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4389                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4390                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4391                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4392                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4393                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4394                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4395                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4396                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4397                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4398                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4399                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4400                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4401                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4402                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4403                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4404                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4405                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4406                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4407                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4408                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4409                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4410                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4411                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4412                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4413                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4414                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4415                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4416                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4417                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4418                 </fields>
4419                 <links>
4420                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4421                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4422                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4423                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4424                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4425                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4426                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4427                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4428                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4429                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4430                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4431                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4432                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4433                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4434                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4435                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4436                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4437                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4438                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4439                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4440                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4441                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4442                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4443                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4444                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4445                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4446                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4447                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4448                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4449                 </links>
4450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4451                         <actions>
4452                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4453                         </actions>
4454                 </permacrud>
4455         </class>
4456         <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">
4457                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4458                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4459                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4460                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4461                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4462                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4463                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4464                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4465                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4466                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4467                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4468                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4469                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4470                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4471                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4472                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4473                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4474                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4475                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4476                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4477                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4478                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4479                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4480                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4481                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4482                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4483                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4484                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4485                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4486                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4487                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4488                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4489                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4490                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4491                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4492                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4493                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4494                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4495                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4496                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4497                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4498                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4499                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4500                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4501                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4502                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4503                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4504                 </fields>
4505                 <links>
4506                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4507                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4508                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4509                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4510                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4511                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4512                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4513                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4514                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4515                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4516                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4517                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4518                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4519                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4520                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4521                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4522                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4523                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4524                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4525                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4526                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4527                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4528                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4529                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4530                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4531                 </links>
4532         </class>
4533         <class id="auch" 
4534                 controller="open-ils.cstore" 
4535                 oils_obj:fieldmapper="action::user_circ_history" 
4536                 oils_persist:tablename="action.usr_circ_history" 
4537                 reporter:label="User Checkout History">
4538                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4539                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4540                         <!-- prevent reporting on the user that owns the checkout history -->
4541                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4542                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4543                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4544                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4545                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4546                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4547                 </fields>
4548                 <links>
4549                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4550                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4551                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4552                 </links>
4553         </class>
4554         <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">
4555                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4556                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4557                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4558                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4559                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4560                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4561                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4562                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4563                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4564                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4565                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4566                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4567                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4568                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4569                 </fields>
4570                 <links>
4571                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4572                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4573                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4574                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4575                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4576                 </links>
4577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4578                         <actions>
4579                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4580                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4581                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4582                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4583                         </actions>
4584                 </permacrud>
4585         </class>
4586
4587         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4588                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4589                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4590                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4591                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4592                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4593                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4594                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4595                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4596                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4597                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4598                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4599                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4600                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4601                 </fields>
4602                 <links>
4603                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4604                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4605                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4606                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4607                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4608                 </links>
4609                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4610                         <actions>
4611                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4612                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4613                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4614                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4615                         </actions>
4616                 </permacrud>
4617         </class>
4618         
4619         <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">
4620                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4621                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4622                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4623                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4624                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4625                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4626                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4627                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4628                 </fields>
4629                 <links>
4630                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4631                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4632                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4633                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4634                 </links>
4635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4636                         <actions>
4637                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4638                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4639                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4640                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4641                         </actions>
4642                 </permacrud>
4643         </class>
4644         
4645         <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">
4646                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4647                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4648                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4649                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4650                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4651                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4652                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4653                 </fields>
4654                 <links>
4655                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4656                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4657                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4658                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4659                 </links>
4660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4661                         <actions>
4662                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4663                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4664                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4665                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4666                         </actions>
4667                 </permacrud>
4668         </class>
4669         
4670         <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">
4671                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4672                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4673                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4674                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4675                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4676                 </fields>
4677                 <links>
4678                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4679                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4680                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4681                 </links>
4682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4683                         <actions>
4684                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4685                     <context link="resource" field="owner" />
4686                 </create>
4687                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4688                     <context link="resource" field="owner" />
4689                 </retrieve>
4690                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4691                     <context link="resource" field="owner" />
4692                 </update>
4693                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4694                     <context link="resource" field="owner" />
4695                 </delete>
4696                         </actions>
4697                 </permacrud>
4698         </class>
4699         
4700         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4701                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4702                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4703                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4704                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4705                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4706                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4707                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4708                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4709                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4710                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4711                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4712                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4713                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4714                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4715                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4716                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4717                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4718                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4719                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4720                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4721                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4722                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4723                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4724                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4725                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4726                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4727                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4728                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4729                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4730                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4731                 </fields>
4732                 <links>
4733                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4734                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4735                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4736                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4737                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4738                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4739                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4740                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4741                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4742                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4743                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4744                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4745                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4746                 </links>
4747                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4748                         <actions>
4749                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4750                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4751                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4752                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4753                         </actions>
4754                 </permacrud>
4755         </class>
4756         
4757         <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">
4758                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4759                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4760                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4761                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4762                 </fields>
4763                 <links>
4764                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4765                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4766                 </links>
4767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4768                         <actions>
4769                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4770                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4771                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4772                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4773                         </actions>
4774                 </permacrud>
4775         </class>
4776
4777         <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">
4778                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4779                         <field name="bucket" reporter:datatype="link"/>
4780                         <field name="id" reporter:datatype="id" />
4781                         <field name="target_call_number" reporter:datatype="link" />
4782                         <field name="create_time" reporter:datatype="timestamp" />
4783                         <field name="pos" reporter:datatype="int" />
4784                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4785                 </fields>
4786                 <links>
4787                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4788                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4789             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4790                 </links>
4791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4792                         <actions>
4793                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
4794                     <context link="bucket" owning_lib="owning_lib"/>
4795                 </retrieve>
4796             </actions>
4797         </permacrud>
4798         </class>
4799         <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">
4800                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4801                         <field name="id" reporter:datatype="id" />
4802                         <field name="item" reporter:datatype="link"/>
4803                         <field name="note" reporter:datatype="text" />
4804                 </fields>
4805                 <links>
4806                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4807                 </links>
4808         </class>
4809         <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">
4810                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4811                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4812                         <field name="btype" reporter:datatype="text"/>
4813                         <field name="id" reporter:datatype="id" />
4814                         <field name="name" reporter:datatype="text"/>
4815                         <field name="description" reporter:datatype="text"/>
4816                         <field name="owner" reporter:datatype="link"/>
4817                         <field name="pub" reporter:datatype="bool"/>
4818                         <field name="create_time" reporter:datatype="timestamp" />
4819                         <field name="owning_lib" reporter:datatype="org_unit" />
4820                 </fields>
4821                 <links>
4822                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4823                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4824                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4825                 </links>
4826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4827                         <actions>
4828                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4829                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4830                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4831                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4832                         </actions>
4833                 </permacrud>
4834         </class>
4835         <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">
4836                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4837                         <field name="id" reporter:datatype="id" />
4838                         <field name="bucket" reporter:datatype="link"/>
4839                         <field name="note" reporter:datatype="text" />
4840                 </fields>
4841                 <links>
4842                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4843                 </links>
4844         </class>
4845         <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">
4846                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4847                         <field name="hold" reporter:datatype="link"/>
4848                         <field name="id" reporter:datatype="id" />
4849                         <field name="target_copy" reporter:datatype="link"/>
4850                         <field name="proximity" reporter:datatype="number"/>
4851                 </fields>
4852                 <links>
4853                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4854                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4855                 </links>
4856         </class>
4857         <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">
4858                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4859                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4860                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4861                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4862                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4863                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4864                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4865                 </fields>
4866                 <links>
4867                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4868                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4869                 </links>
4870         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4871             <actions>
4872                 <create permission="CREATE_HOLD_NOTIFICATION">
4873                                         <context link="hold" jump="usr" field="home_ou" />
4874                                 </create>
4875                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4876                                         <context link="hold" jump="usr" field="home_ou" />
4877                                 </retrieve>
4878                 <update permission="CREATE_HOLD_NOTIFICATION">
4879                                         <context link="hold" jump="usr" field="home_ou" />
4880                                 </update>
4881                 <delete permission="CREATE_HOLD_NOTIFICATION">
4882                                         <context link="hold" jump="usr" field="home_ou" />
4883                                 </delete>
4884             </actions>
4885         </permacrud>
4886         </class>
4887         <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">
4888                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4889                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4890                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4891                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4892                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4893                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4894                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4895                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4896                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4897                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4898                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4899                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4900                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4901                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4902                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4903                 </fields>
4904                 <links>
4905                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4906                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4907                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4908                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4909                 </links>
4910         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4911             <actions>
4912                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4913                 <retrieve/>
4914                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4915                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4916             </actions>
4917         </permacrud>
4918         </class>
4919         <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">
4920                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4921                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4922                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4923                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4924                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4925             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4926             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4927             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4928                 </fields>
4929                 <links>
4930                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4931                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4932                 </links>
4933         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4934             <actions>
4935                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4936                 <retrieve/>
4937                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4938                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4939             </actions>
4940         </permacrud>
4941         </class>
4942         <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">
4943                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4944                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4945             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4946             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4947                 </fields>
4948                 <links>
4949                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4950                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4951                 </links>
4952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4953             <actions>
4954                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4955                                         <context link="lgroup" field="owner" />
4956                 </create>
4957                 <retrieve/>
4958                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4959                                         <context link="lgroup" field="owner" />
4960                 </update>
4961                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4962                                         <context link="lgroup" field="owner" />
4963                 </delete>
4964             </actions>
4965         </permacrud>
4966         </class>
4967
4968     <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">
4969         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4970             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4971             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4972             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4973             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4974         </fields>
4975         <links>
4976             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4977             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4978         </links>
4979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4980             <actions>
4981                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4982                 <retrieve/>
4983                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4984                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4985             </actions>
4986         </permacrud>
4987     </class>
4988
4989         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4990                 <fields>
4991                         <field name="sre_id" oils_persist:virtual="true" />
4992                         <field name="location" oils_persist:virtual="true" />
4993                         <field name="owning_lib" oils_persist:virtual="true" />
4994                         <field name="basic_holdings" oils_persist:virtual="true" />
4995                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4996                         <field name="supplement_holdings" oils_persist:virtual="true" />
4997                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4998                         <field name="index_holdings" oils_persist:virtual="true" />
4999                         <field name="index_holdings_add" oils_persist:virtual="true" />
5000                         <field name="online" oils_persist:virtual="true" />
5001                         <field name="missing" oils_persist:virtual="true" />
5002                         <field name="incomplete" oils_persist:virtual="true" />
5003                 </fields>
5004         </class>
5005
5006         <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">
5007                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5008                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5009                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5010                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5011                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5012                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5013                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5014                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5015                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5016                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5017                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5018                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5019                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5020                 </fields>
5021                 <links>
5022                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5023                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5024                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5025                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5026                 </links>
5027                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5028                         <actions>
5029                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5030                                 <retrieve/>
5031                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5032                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5033                         </actions>
5034                 </permacrud>
5035         </class>
5036
5037         <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">
5038                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5039                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5040                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5041                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5042                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5043                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5044                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5045                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5046                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5047                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5048                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5049                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5050                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5051                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5052                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5053                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5054                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5055                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5056                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5057                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5058                 </fields>
5059                 <links>
5060                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5061                 </links>
5062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5063                         <actions>
5064                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5065                                         <context link="subscription" field="owning_lib" />
5066                                 </create>
5067                                 <retrieve />
5068                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5069                                         <context link="subscription" field="owning_lib" />
5070                                 </update>
5071                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5072                                         <context link="subscription" field="owning_lib" />
5073                                 </delete>
5074                         </actions>
5075                 </permacrud>
5076         </class>
5077
5078         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5079                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5080                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5081                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5082                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5083                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5084                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5085                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5086                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5087                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5088                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5089                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5090                 </fields>
5091                 <links>
5092                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5093                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5094                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5095                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5096                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5097                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5098                 </links>
5099                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5100                         <actions>
5101                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5102                                 <retrieve />
5103                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5104                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5105                         </actions>
5106                 </permacrud>
5107         </class>
5108
5109         <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">
5110                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5111                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5112                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5113                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5114                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5115                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5116                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5117                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5118                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5119                 </fields>
5120                 <links>
5121                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5122                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5123                 </links>
5124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5125                         <actions>
5126                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5127                     <context link="subscription" field="owning_lib"/>
5128                 </create>
5129                                 <retrieve />
5130                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5131                     <context link="subscription" field="owning_lib"/>
5132                 </update>
5133                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5134                     <context link="subscription" field="owning_lib"/>
5135                 </delete>
5136                         </actions>
5137                 </permacrud>
5138         </class>
5139
5140         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5141                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5142                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5143                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5144                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5145                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5146                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5147                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5148                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5149                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5150                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5151                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5152                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5153                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5154                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5155                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5156                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5157                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5158                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5159                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5160                 </fields>
5161                 <links>
5162                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5163                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5164                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5165                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5166                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5167                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5168                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5169                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5170                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5171                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5172                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5173                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5174                 </links>
5175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5176                         <actions>
5177                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5178                                 <retrieve />
5179                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5180                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5181                         </actions>
5182                 </permacrud>
5183         </class>
5184
5185         <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">
5186                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5187                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5188                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5189                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5190                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5191                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5192                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5193                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5194                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5195                 </fields>
5196                 <links>
5197                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5198                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5199                 </links>
5200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5201                         <actions>
5202                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5203                                         <context link="distribution" field="holding_lib" />
5204                                 </create>
5205                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5206                                         <context link="distribution" field="holding_lib" />
5207                                 </retrieve>
5208                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5209                                         <context link="distribution" field="holding_lib" />
5210                                 </update>
5211                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5212                                         <context link="distribution" field="holding_lib" />
5213                                 </delete>
5214                         </actions>
5215                 </permacrud>
5216         </class>
5217
5218         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5219                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5220                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5221                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5222                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5223                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5224                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5225                 </fields>
5226                 <links>
5227                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5228                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5229                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5230                 </links>
5231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5232                         <actions>
5233                                 <create permission="ADMIN_SERIAL_STREAM">
5234                                         <context link="distribution" field="holding_lib" />
5235                                 </create>
5236                                 <retrieve />
5237                                 <update permission="ADMIN_SERIAL_STREAM">
5238                                         <context link="distribution" field="holding_lib" />
5239                                 </update>
5240                                 <delete permission="ADMIN_SERIAL_STREAM">
5241                                         <context link="distribution" field="holding_lib" />
5242                                 </delete>
5243                         </actions>
5244                 </permacrud>
5245         </class>
5246
5247         <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">
5248                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5249                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5250                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5251                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5252                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5253                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5254                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5255                 </fields>
5256                 <links>
5257                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5258                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5259                 </links>
5260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5261                         <actions>
5262                                 <create permission="ADMIN_SERIAL_STREAM">
5263                                         <context link="stream" jump="distribution" field="holding_lib" />
5264                                 </create>
5265                                 <retrieve permission="RECEIVE_SERIAL">
5266                                         <context link="stream" jump="distribution" field="holding_lib" />
5267                                 </retrieve>
5268                                 <update permission="ADMIN_SERIAL_STREAM">
5269                                         <context link="stream" jump="distribution" field="holding_lib" />
5270                                 </update>
5271                                 <delete permission="ADMIN_SERIAL_STREAM">
5272                                         <context link="stream" jump="distribution" field="holding_lib" />
5273                                 </delete>
5274                         </actions>
5275                 </permacrud>
5276         </class>
5277
5278         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5279                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5280                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5281                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5282                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5283                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5284                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5285                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5286                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5287                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5288                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5289                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5290                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5291                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5292                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5293                 </fields>
5294                 <links>
5295                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5296                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5297                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5298                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5299                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5300                 </links>
5301                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5302                         <actions>
5303                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5304                                         <context link="subscription" field="owning_lib" />
5305                                 </create>
5306                                 <retrieve/>
5307                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5308                                         <context link="subscription" field="owning_lib" />
5309                                 </update>
5310                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5311                                         <context link="subscription" field="owning_lib" />
5312                                 </delete>
5313                         </actions>
5314                 </permacrud>
5315         </class>
5316
5317         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5318                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5319                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5320                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5321                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5322                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5323                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5324                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5325                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5326                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5327                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5328                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5329                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5330                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5331                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5332                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5333                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5334                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5335                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5336                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5337                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5338                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5339                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5340                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5341                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5342                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5343                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5344                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5345                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5346                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5347                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5348                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5349                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5350                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5351                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5352                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5353                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5354                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5355                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5356                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5357                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5358                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5359                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5360                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5361                 </fields>
5362                 <links>
5363                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5364                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5365                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5366                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5367                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5368                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5369                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5370                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5371                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5372                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5373                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5374                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5375                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5376                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5377                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5378                 </links>
5379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5380                         <actions>
5381                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5382                                 <retrieve/>
5383                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5384                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5385                         </actions>
5386                 </permacrud>
5387         </class>
5388
5389         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5390                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5391                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5392                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5393                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5394                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5395                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5396                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5397                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5398                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5399                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5400                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5401                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5402                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5403                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5404                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5405                 </fields>
5406                 <links>
5407                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5408                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5409                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5410                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5411                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5412                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5413                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5414                 </links>
5415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5416                         <actions>
5417                                 <create permission="ADMIN_SERIAL_ITEM">
5418                                         <context link="stream" jump="distribution" field="holding_lib" />
5419                                 </create>
5420                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5421                                         <context link="stream" jump="distribution" field="holding_lib" />
5422                                 </retrieve>
5423                                 <update permission="ADMIN_SERIAL_ITEM">
5424                                         <context link="stream" jump="distribution" field="holding_lib" />
5425                                 </update>
5426                                 <delete permission="ADMIN_SERIAL_ITEM">
5427                                         <context link="stream" jump="distribution" field="holding_lib" />
5428                                 </delete>
5429                         </actions>
5430                 </permacrud>
5431         </class>
5432
5433         <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">
5434                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5435                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5436                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5437                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5438                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5439                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5440                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5441                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5442                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5443                 </fields>
5444                 <links>
5445                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5446                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5447                 </links>
5448                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5449                         <actions>
5450                                 <create permission="ADMIN_SERIAL_ITEM">
5451                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5452                                 </create>
5453                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5454                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5455                                 </retrieve>
5456                                 <update permission="ADMIN_SERIAL_ITEM">
5457                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5458                                 </update>
5459                                 <delete permission="ADMIN_SERIAL_ITEM">
5460                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5461                                 </delete>
5462                         </actions>
5463                 </permacrud>
5464         </class>
5465         <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">
5466                 <fields>
5467                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5468                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5469                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5470                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5471                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5472                 </fields>
5473                 <links>
5474                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5475                 </links>
5476         </class>
5477         <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">
5478                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5479                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5480                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5481                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5482                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5483                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5484                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5485                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5486                 </fields>
5487                 <links>
5488                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5489                 </links>
5490         </class>
5491         <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">
5492                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5493                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5494                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5495                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5496                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5497                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5498                 </fields>
5499                 <links>
5500                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5501                 </links>
5502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5503                         <actions>
5504                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5505                                         <context link="distribution" field="holding_lib" />
5506                                 </create>
5507                                 <retrieve/>
5508                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5509                                         <context link="distribution" field="holding_lib" />
5510                                 </update>
5511                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5512                                         <context link="distribution" field="holding_lib" />
5513                                 </delete>
5514                         </actions>
5515                 </permacrud>
5516         </class>
5517
5518         <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">
5519                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5520                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5521                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5522                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5523                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5524                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5525                 </fields>
5526                 <links>
5527                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5528                 </links>
5529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5530                         <actions>
5531                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5532                                         <context link="distribution" field="holding_lib" />
5533                                 </create>
5534                                 <retrieve/>
5535                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5536                                         <context link="distribution" field="holding_lib" />
5537                                 </update>
5538                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5539                                         <context link="distribution" field="holding_lib" />
5540                                 </delete>
5541                         </actions>
5542                 </permacrud>
5543         </class>
5544
5545         <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">
5546                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5547                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5548                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5549                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5550                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5551                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5552                 </fields>
5553                 <links>
5554                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5555                 </links>
5556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5557                         <actions>
5558                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5559                                         <context link="distribution" field="holding_lib" />
5560                                 </create>
5561                                 <retrieve/>
5562                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5563                                         <context link="distribution" field="holding_lib" />
5564                                 </update>
5565                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5566                                         <context link="distribution" field="holding_lib" />
5567                                 </delete>
5568                         </actions>
5569                 </permacrud>
5570         </class>
5571
5572         <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">
5573                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5574                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5575                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5576                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5577                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5578                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5579                 </fields>
5580                 <links>
5581                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5582                 </links>
5583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5584                         <actions>
5585                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5586                                 <retrieve/>
5587                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5588                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5589                         </actions>
5590                 </permacrud>
5591         </class>
5592
5593         <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">
5594                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5595                         <field name="id" reporter:datatype="id" />
5596                         <field name="owning_copy" reporter:datatype="link"/>
5597                         <field name="stat_cat" reporter:datatype="link"/>
5598                         <field name="stat_cat_entry" reporter:datatype="link"/>
5599                 </fields>
5600                 <links>
5601                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5602                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5603                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5604                 </links>
5605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5606                         <actions>
5607                                 <retrieve/>
5608                         </actions>
5609                 </permacrud>
5610         </class>
5611         <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">
5612                 <fields oils_persist:primary="code">
5613                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5614                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5615                 </fields>
5616                 <links/>
5617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5618             <actions>
5619                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5620                 <retrieve/>
5621                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5622                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5623             </actions>
5624         </permacrud>
5625         </class>
5626         <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">
5627                 <fields oils_persist:primary="code">
5628                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5629                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5630                 </fields>
5631                 <links/>
5632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5633             <actions>
5634                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5635                 <retrieve/>
5636                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5637                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5638             </actions>
5639         </permacrud>
5640         </class>
5641         <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">
5642                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5643                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5644                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5645                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5646                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5647                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5648                 </fields>
5649                 <links>
5650             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5651         </links>
5652         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5653             <actions>
5654                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5655                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5656                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5657                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5658             </actions>
5659         </permacrud>
5660         </class>
5661         <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">
5662                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5663                         <field name="id" reporter:datatype="id" />
5664                         <field name="name" reporter:datatype="text"/>
5665                 </fields>
5666                 <links/>
5667         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5668             <actions>
5669                 <create permission="CREATE_LASSO" global_required="true"/>
5670                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5671                 <update permission="UPDATE_LASSO" global_required="true"/>
5672                 <delete permission="DELETE_LASSO" global_required="true"/>
5673             </actions>
5674         </permacrud>
5675         </class>
5676         <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">
5677                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5678                         <field name="id" reporter:datatype="id" />
5679                         <field name="lasso" reporter:datatype="link"/>
5680                         <field name="org_unit" reporter:datatype="org_unit"/>
5681                 </fields>
5682                 <links>
5683                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5684                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5685                 </links>
5686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5687             <actions>
5688                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5689                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5690                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5691                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5692             </actions>
5693         </permacrud>
5694         </class>
5695         <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">
5696                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5697                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5698                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5699                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5700                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5701                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5702                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5703                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5704                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5705                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5706                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5707                 </fields>
5708                 <links>
5709                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5710                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5711                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5712                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5713                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5714                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5715                 </links>
5716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5717             <actions>
5718                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5719                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5720                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5721                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5722             </actions>
5723         </permacrud>
5724         </class>
5725         <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">
5726                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5727                         <field name="id" reporter:datatype="id" />
5728                         <field name="from_org" reporter:datatype="org_unit"/>
5729                         <field name="to_org" reporter:datatype="org_unit"/>
5730                         <field name="prox" reporter:datatype="int" />
5731                 </fields>
5732                 <links>
5733                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5734                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5735                 </links>
5736         </class>
5737         <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">
5738                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5739                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5740                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5741                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5742                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5743                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5744                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5745                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5746                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5747                 </fields>
5748                 <links/>
5749         </class>
5750         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5751                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5752                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5753                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5754                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5755                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5756                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5757                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5758                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5759                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5760                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5761                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5762                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5763                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5764                 </fields>
5765                 <links>
5766                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5767                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5768                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5769                 </links>
5770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5771             <actions>
5772                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5773                 <retrieve/>
5774                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5775                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5776             </actions>
5777         </permacrud>
5778         </class>
5779         <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">
5780                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5781                         <field name="address_type"  reporter:datatype="text"/>
5782                         <field name="city"  reporter:datatype="text"/>
5783                         <field name="country"  reporter:datatype="text"/>
5784                         <field name="county"  reporter:datatype="text"/>
5785                         <field name="id" reporter:datatype="id" />
5786                         <field name="org_unit" reporter:datatype="org_unit"/>
5787                         <field name="post_code"  reporter:datatype="text"/>
5788                         <field name="state"  reporter:datatype="text"/>
5789                         <field name="street1"  reporter:datatype="text"/>
5790                         <field name="street2"  reporter:datatype="text"/>
5791                         <field name="valid" reporter:datatype="bool"/>
5792                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5793                 </fields>
5794                 <links>
5795                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5796                 </links>
5797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5798             <actions>
5799                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5800                 <retrieve/>
5801                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5802                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5803             </actions>
5804         </permacrud>
5805         </class>
5806         <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">
5807                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5808                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5809                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5810                         <field name="query_text" reporter:datatype="text"/>
5811                 </fields>
5812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5813             <actions>
5814                 <retrieve/>
5815             </actions>
5816         </permacrud>
5817         </class>
5818
5819         <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">
5820                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5821                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5822                         <field name="owner" reporter:datatype="org_unit"/>
5823                         <field name="code" reporter:datatype="text"/>
5824                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5825                         <field name="create_date" reporter:datatype="timestamp"/>
5826                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5827                 </fields>
5828                 <links>
5829                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5830                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5831                 </links>
5832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5833             <actions>
5834                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5835                 <retrieve/>
5836                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5837                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5838             </actions>
5839         </permacrud>
5840         </class>
5841         <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">
5842                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5843                         <field name="id" reporter:datatype="id"/>
5844                         <field name="grp" reporter:datatype="link"/>
5845                         <field name="pos" reporter:datatype="int"/>
5846                         <field name="query" reporter:datatype="link"/>
5847                 </fields>
5848                 <links>
5849                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5850                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5851                 </links>
5852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5853             <actions>
5854                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5855                     <context link="grp" field="owner"/>
5856                 </create>
5857                 <retrieve/>
5858                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5859                     <context link="grp" field="owner"/>
5860                 </update>
5861                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5862                     <context link="grp" field="owner"/>
5863                 </delete>
5864             </actions>
5865         </permacrud>
5866         </class>
5867
5868         <!-- A note: Please update alhr and ahopl when updating ahr -->
5869         <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">
5870                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5871                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5872                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5873                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5874                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5875                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5876                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5877                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5878                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5879                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5880                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5881                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5882                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5883                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5884                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5885                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5886                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5887                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5888                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5889                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5890                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5891                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5892                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5893                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5894                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5895                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5896                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5897                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5898                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5899                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5900                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5901                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5902                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5903                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5904                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5905                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5906                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5907                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5908                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5909                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5910                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5911                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5912                 </fields>
5913                 <links>
5914                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5915                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5916                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5917                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5918                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5919                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5920                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5921                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5922                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5923                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5924                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5925                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5926                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5927                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5928                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5929                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5930                 </links>
5931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5932                         <actions>
5933                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5934                         </actions>
5935                 </permacrud>
5936         </class>
5937         <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">
5938                 <oils_persist:source_definition><![CDATA[
5939                 SELECT
5940                         ahr.*,
5941                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5942                                 copy_location_order_position,
5943                         CASE WHEN au.alias IS NOT NULL THEN
5944                                 au.alias
5945                         ELSE
5946                                 au.first_given_name
5947                         END AS usr_alias_or_first_given_name,
5948                         au.first_given_name AS usr_first_given_name,
5949                         au.second_given_name AS usr_second_given_name,
5950                         au.family_name AS usr_family_name,
5951                         au.prefix AS usr_prefix,
5952                         au.suffix AS usr_suffix,
5953                         au.alias AS usr_alias,
5954                         CASE WHEN au.alias IS NOT NULL THEN
5955                                 au.alias
5956                         ELSE
5957                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5958                                         COALESCE(au.family_name, ''),
5959                                         COALESCE(au.suffix, ''),
5960                                         ', ',
5961                                         COALESCE(au.prefix, ''),
5962                                         COALESCE(au.first_given_name, ''),
5963                                         COALESCE(au.second_given_name, '')
5964                                 ], ' '), E'\\s+,', ',')
5965                         END AS usr_alias_or_display_name,
5966                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5967                                 COALESCE(au.family_name, ''),
5968                                 COALESCE(au.suffix, ''),
5969                                 ', ',
5970                                 COALESCE(au.prefix, ''),
5971                                 COALESCE(au.first_given_name, ''),
5972                                 COALESCE(au.second_given_name, '')
5973                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5974                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5975                                 AS call_number_label,
5976                         siss.label AS issuance_label,
5977                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5978                         ahcm_1.copy_count AS potential_copies
5979                 FROM action.hold_request ahr
5980                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5981                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5982                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5983                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5984                 JOIN actor.usr au ON (au.id = ahr.usr)
5985                 JOIN (
5986                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5987                         FROM asset.copy_location
5988                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5989                 LEFT JOIN actor.usr_standing_penalty ausp 
5990                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5991                 LEFT JOIN config.standing_penalty csp
5992                         ON (
5993                                 csp.id = ausp.standing_penalty AND 
5994                                 csp.block_list LIKE '%CAPTURE%' AND (
5995                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5996                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5997                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5998                                         )
5999                                 )
6000                         )
6001                 JOIN (
6002                         SELECT COUNT(target_copy) AS copy_count, hold
6003                         FROM action.hold_copy_map
6004                         GROUP BY 2
6005                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6006                 LEFT JOIN serial.issuance siss
6007                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6008                 LEFT JOIN asset.copy_location_order acplo
6009                         ON (acp.location = acplo.location AND
6010                                 acp.circ_lib = acplo.org)
6011                 WHERE
6012                         ahr.capture_time IS NULL AND
6013                         ahr.cancel_time IS NULL AND
6014                         csp.id IS NULL AND
6015                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6016                         acp.status IN (0,7)
6017                 ]]></oils_persist:source_definition>
6018                 <fields oils_persist:primary="id">
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="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6060                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6061                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6062                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6063                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6064                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6065                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6066                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6067                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6068                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6069                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6070                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6071                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6072                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6073                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6074                 </fields>
6075                 <links>
6076                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6077                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6078                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6079                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6080                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6081                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6082                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6083                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6084                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6085                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6086                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6087                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6088                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6089                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6090                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6091                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6092                 </links>
6093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6094                         <actions>
6095                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6096                         </actions>
6097                 </permacrud>
6098         </class>
6099         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6100                 <oils_persist:source_definition>
6101                         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)
6102                 </oils_persist:source_definition>
6103                 <fields oils_persist:primary="id">
6104                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6105                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6106                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6107                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6108                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6109                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6110                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6111                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6112                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6113                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6114                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6115                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6116                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6117                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6118                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6119                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6120                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6121                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6122                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6123                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6124                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6125                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6126                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6127                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6128                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6129                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6130                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6131                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6132                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6133                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6134                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6135                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6136                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6137                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6138                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6139                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6140                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6141                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6142                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6143                 </fields>
6144                 <links>
6145                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6146                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6147                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6148                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6149                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6150                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6151                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6152                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6153                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6154                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6155                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6156                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6157                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6158                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6159                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6160                 </links>
6161         </class>
6162
6163         <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">
6164                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6165                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6166                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6167                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6168                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6169                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6170                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6171                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6172                 </fields>
6173                 <links>
6174                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6175                 </links>
6176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6177                         <actions>
6178                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6179                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6180                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6181                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6182                         </actions>
6183                 </permacrud>
6184         </class>
6185         <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">
6186                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6187                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6188                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6189                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6190                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6191                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6192                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6193                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6194                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6195                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6196                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6197                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6198                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6199                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6200                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6201                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6202                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6203                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6204                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6205                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6206                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6207                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6208                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6209                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6210                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6211                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6212                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6213                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6214                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6215                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6216                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6217                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6218                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6219                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6220                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6221                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6222                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6223                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6224                 </fields>
6225                 <links>
6226                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6227                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6228                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6229                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6230                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6231                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6232                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6233                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6234                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6235                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6236                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6237                 </links>
6238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6239                         <actions>
6240                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6241                         </actions>
6242                 </permacrud>
6243         </class>
6244         <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">
6245                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6246                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6247                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6248                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6249                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6250                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6251                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6252                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6253                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6254                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6255                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6256                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6257                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6258                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6259                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6260                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6261                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6262                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6263                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6264                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6265                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6266                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6267                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6268                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6269                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6270                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6271                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6272                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6273                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6274                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6275                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6276                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6277                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6278                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6279                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6280                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6281                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6282                 </fields>
6283                 <links>
6284                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6285                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6286                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6287                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6288                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6289                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6290                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6291                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6292                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6293                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6294                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6295                 </links>
6296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6297                         <actions>
6298                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6299                         </actions>
6300                 </permacrud>
6301         </class>
6302
6303         <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">
6304                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6305                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6306                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6307                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6308                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6309                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6310                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6311                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6312                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6313                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6314                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6315                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6316                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6317                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6318                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6319                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6320                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6321                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6322                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6323                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6324                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6325                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6326                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6327                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6328                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6329                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6330                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6331                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6332                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6333                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6334                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6335                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6336                 </fields>
6337                 <links>
6338                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6339                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6340                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6341                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6342                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6343                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6344                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6345                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6346                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6347                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6348                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6349                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6350                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6351                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6352                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6353                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6354                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6355                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6356                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6357                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6358                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6359                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6360                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6361                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6362                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6363                 </links>
6364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6365             <actions>
6366                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6367                 <retrieve />
6368                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6369                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6370             </actions>
6371         </permacrud>
6372         </class>
6373         <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">
6374                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6375                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6376                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6377                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6378                 </fields>
6379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6380                         <actions>
6381                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6382                                 <retrieve/>
6383                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6384                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6385                         </actions>
6386                 </permacrud>
6387         </class>
6388         <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">
6389                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6390                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6391                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6392                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6393                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6394                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6395                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6396                 </fields>
6397                 <links>
6398                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6399                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6400                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6401                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6402                 </links>
6403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6404                         <actions>
6405                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6406                                 <retrieve/>
6407                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6408                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6409                         </actions>
6410                 </permacrud>
6411         </class>
6412         <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">
6413                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6414                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6415                         <field name="btype" reporter:datatype="text"/>
6416                         <field name="id" reporter:datatype="id" />
6417                         <field name="name"  reporter:datatype="text"/>
6418                         <field name="description" reporter:datatype="text"/>
6419                         <field name="owner" reporter:datatype="link"/>
6420                         <field name="pub" reporter:datatype="bool"/>
6421                         <field name="create_time" reporter:datatype="timestamp" />
6422                         <field name="owning_lib" reporter:datatype="org_unit" />
6423                 </fields>
6424                 <links>
6425                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6426                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6427                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6428                 </links>
6429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6430                         <actions>
6431                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6432                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6433                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6434                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6435                         </actions>
6436                 </permacrud>
6437         </class>
6438         <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">
6439                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6440                         <field name="id" reporter:datatype="id" />
6441                         <field name="bucket" reporter:datatype="link"/>
6442                         <field name="note" reporter:datatype="text" />
6443                 </fields>
6444                 <links>
6445                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6446                 </links>
6447         </class>
6448         <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">
6449                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6450                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6451                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6452                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6453                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6454                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6455                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6456                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6457                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6458                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6459                 </fields>
6460                 <links>
6461                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6462                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6463                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6464                 </links>
6465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6466                         <actions>
6467                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6468                         </actions>
6469                 </permacrud>
6470         </class>
6471         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6472                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6473                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6474                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6475                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6476                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6477                 </fields>
6478                 <links>
6479                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6480                 </links>
6481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6482                         <actions>
6483                                 <retrieve permission="VIEW_USER">
6484                                         <context link="usr" field="home_ou" />
6485                                 </retrieve>
6486                         </actions>
6487                 </permacrud>
6488         </class>
6489     <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">
6490         <fields oils_persist:primary="field">
6491             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6492             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6493             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6494         </fields>
6495         <links/>
6496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6497             <actions>
6498                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6499                 <retrieve />
6500                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6501                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6502             </actions>
6503         </permacrud>
6504     </class>
6505         <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">
6506                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6507                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6508                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6509                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6510                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6511                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6512                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6513                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6514                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6515                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6516                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6517                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6518                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6519                 </fields>
6520                 <links>
6521                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6522                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6523                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6524                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6525                 </links>
6526         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6527             <actions>
6528                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6529                 <retrieve />
6530                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6531                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6532             </actions>
6533         </permacrud>
6534         </class>
6535         <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">
6536                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6537                         <field name="field" reporter:datatype="link"/>
6538                         <field name="id" reporter:datatype="id" />
6539                         <field name="source" reporter:datatype="link"/>
6540                         <field name="value"  reporter:datatype="text"/>
6541                 </fields>
6542                 <links>
6543                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6544                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6545                 </links>
6546         </class>
6547         <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">
6548                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6549                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6550                         <field name="btype" reporter:datatype="text"/>
6551                         <field name="id" reporter:datatype="id" />
6552                         <field name="name"  reporter:datatype="text"/>
6553                         <field name="description" reporter:datatype="text"/>
6554                         <field name="owner" reporter:datatype="link"/>
6555                         <field name="pub" reporter:datatype="bool"/>
6556                         <field name="create_time" reporter:datatype="timestamp" />
6557                         <field name="owning_lib" reporter:datatype="org_unit" />
6558                 </fields>
6559                 <links>
6560                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6561                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6562                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6563                 </links>
6564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6565                         <actions>
6566                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6567                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6568                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6569                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6570                         </actions>
6571                 </permacrud>
6572         </class>
6573         <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">
6574                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6575                         <field name="id" reporter:datatype="id" />
6576                         <field name="bucket" reporter:datatype="link"/>
6577                         <field name="note" reporter:datatype="text" />
6578                 </fields>
6579                 <links>
6580                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6581                 </links>
6582         </class>
6583         <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">
6584                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6585                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6586                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6587                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6588                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6589                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6590                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6591                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6592                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6593                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6594                 </fields>
6595                 <links>
6596                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6597                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6598                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6599                 </links>
6600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6601             <actions>
6602                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6603                     <context link="xact" jump="usr" field="home_ou"/>
6604                 </retrieve>
6605                         </actions>
6606                 </permacrud>
6607         </class>
6608         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6609                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6610                         <field name="id" reporter:datatype="id" />
6611                         <field name="ind1" />
6612                         <field name="ind2" />
6613                         <field name="record" />
6614                         <field name="subfield" />
6615                         <field name="tag" />
6616                         <field name="value" />
6617                 </fields>
6618                 <links>
6619                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6620                 </links>
6621         </class>
6622         <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">
6623                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6624                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6625                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6626                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6627                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6628                 </fields>
6629                 <links>
6630                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6631                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6632                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6633                 </links>
6634         </class>
6635         <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">
6636                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6637                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6638                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6639                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6640                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6641                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6642                 </fields>
6643                 <links>
6644                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6645                 </links>
6646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6647             <actions>
6648                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6649                 <retrieve/>
6650                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6651                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6652             </actions>
6653         </permacrud>
6654
6655         </class>
6656         <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">
6657                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6658                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6659                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6660                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6661                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6662                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6663                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6664                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6665                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6666                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6667                 </fields>
6668                 <links>
6669                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6670                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6671                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6672                 </links>
6673         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6674             <actions>
6675                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6676                 <retrieve/>
6677                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6678                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6679             </actions>
6680         </permacrud>
6681         </class>
6682         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6683                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6684                         <field name="create_date" reporter:datatype="timestamp"/>
6685                         <field name="creator" reporter:datatype="link"/>
6686                         <field name="edit_date" reporter:datatype="timestamp"/>
6687                         <field name="editor" reporter:datatype="link"/>
6688                         <field name="id" reporter:datatype="id" />
6689                         <field name="pub" reporter:datatype="bool"/>
6690                         <field name="record" reporter:datatype="link"/>
6691                         <field name="value"  reporter:datatype="text"/>
6692                 </fields>
6693                 <links>
6694                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6695                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6696                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6697                 </links>
6698         </class>
6699         <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">
6700                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6701                         <field name="balance_owed" reporter:datatype="money" />
6702                         <field name="total_owed" reporter:datatype="money" />
6703                         <field name="total_paid" reporter:datatype="money" />
6704                         <field name="usr" reporter:datatype="link"/>
6705                 </fields>
6706                 <links>
6707                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6708                 </links>
6709         </class>
6710     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6711                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6712                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6713                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6714                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6715                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6716                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6717                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6718                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6719                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6720                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6721                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6722                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6723                 </fields>
6724                 <links>
6725                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6726                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6727                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6728                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6729                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6730                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6731                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6732                 </links>
6733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6734             <actions>
6735                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
6736             </actions>
6737         </permacrud>
6738         </class>
6739         <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">
6740                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6741                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6742                         <field name="quality" reporter:datatype="int" />
6743                         <field name="source" reporter:datatype="text"/>
6744                         <field name="transcendant" reporter:datatype="bool"/>
6745                         <field name="can_have_copies" reporter:datatype="bool"/>
6746                 </fields>
6747                 <links/>
6748         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6749             <actions>
6750                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6751                 <retrieve/>
6752                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6753                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6754             </actions>
6755         </permacrud>
6756         </class>
6757         <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">
6758                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6759                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6760                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6761                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6762                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6763                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6764                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6765                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6769                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6770                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6771                 </fields>
6772                 <links>
6773                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6774                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6775                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6776                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6777                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6778                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6779                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6780                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6781                 </links>
6782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6783                         <actions>
6784                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6785                                         <context link="usr" field="home_ou" />
6786                                 </retrieve>
6787                         </actions>
6788                 </permacrud>
6789         </class>
6790         <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">
6791                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6792                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6793                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6794                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6795                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6796                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6797                 </fields>
6798                 <links>
6799                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6800                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6801                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6802                 </links>
6803         </class>
6804         <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">
6805                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6806                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6807                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6808                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6809                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6810                 </fields>
6811                 <links>
6812                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6813                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6814                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6815                 </links>
6816         </class>
6817         <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">
6818                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6819                         <field name="bucket" reporter:datatype="link"/>
6820                         <field name="id" reporter:datatype="id" />
6821                         <field name="target_user" reporter:datatype="link"/>
6822                         <field name="create_time" reporter:datatype="timestamp" />
6823                         <field name="pos" reporter:datatype="int" />
6824                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6825                 </fields>
6826                 <links>
6827                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6828                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6829             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6830                 </links>
6831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6832                         <actions>
6833                                 <retrieve permission="ADMIN_USER_BUCKET">
6834                     <context link="bucket" owning_lib="owning_lib"/>
6835                 </retrieve>
6836             </actions>
6837         </permacrud>
6838         </class>
6839         <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">
6840                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6841                         <field name="id" reporter:datatype="id" />
6842                         <field name="item" reporter:datatype="link"/>
6843                         <field name="note" reporter:datatype="text" />
6844                 </fields>
6845                 <links>
6846                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6847                 </links>
6848         </class>
6849         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6850                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6851                         <field name="balance_owed" reporter:datatype="money" />
6852                         <field name="total_owed" reporter:datatype="money" />
6853                         <field name="total_paid" reporter:datatype="money" />
6854                         <field name="usr" reporter:datatype="link"/>
6855                 </fields>
6856                 <links>
6857                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6858                 </links>
6859         </class>
6860         <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">
6861                 <fields oils_persist:primary="code" oils_persist:sequence="">
6862                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6863                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6864                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6865                 </fields>
6866                 <links/>
6867         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6868             <actions>
6869                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6870                 <retrieve/>
6871                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6872                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6873             </actions>
6874         </permacrud>
6875         </class>
6876         <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">
6877                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6878                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6879                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6880                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6881                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6882                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6883                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6884                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6885                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6886                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6887                 </fields>
6888                 <links>
6889                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6890                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6891                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6892                 </links>
6893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6894             <actions>
6895                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6896                     <context link="xact" jump="usr" field="home_ou"/>
6897                 </retrieve>
6898                         </actions>
6899                 </permacrud>
6900         </class>
6901         <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">
6902                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6903                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6904                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6905                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6906                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6907                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6908                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6909                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6910                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6911                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6912                 </fields>
6913                 <links>
6914                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6915                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6916                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6917                 </links>
6918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6919             <actions>
6920                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6921                     <context link="xact" jump="usr" field="home_ou"/>
6922                 </retrieve>
6923                         </actions>
6924                 </permacrud>
6925         </class>
6926         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6927                 <fields oils_persist:primary="id" oils_persist:sequence="">
6928                         <field name="checkin_lib" reporter:datatype="link"/>
6929                         <field name="checkin_staff" reporter:datatype="link"/>
6930                         <field name="checkin_time" reporter:datatype="timestamp"/>
6931                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6932                         <field name="circ_staff" reporter:datatype="link"/>
6933                         <field name="desk_renewal" reporter:datatype="bool"/>
6934                         <field name="due_date" reporter:datatype="timestamp"/>
6935                         <field name="duration" reporter:datatype="interval"/>
6936                         <field name="duration_rule" reporter:datatype="link"/>
6937                         <field name="fine_interval" reporter:datatype="interval"/>
6938                         <field name="id" reporter:datatype="id" />
6939                         <field name="max_fine" reporter:datatype="money" />
6940                         <field name="max_fine_rule" reporter:datatype="link"/>
6941                         <field name="opac_renewal" reporter:datatype="bool"/>
6942                         <field name="phone_renewal" reporter:datatype="bool"/>
6943                         <field name="recurring_fine" reporter:datatype="money" />
6944                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6945                         <field name="renewal_remaining" reporter:datatype="int" />
6946             <field name="grace_period" reporter:datatype="interval" />
6947                         <field name="stop_fines" reporter:datatype="text"/>
6948                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6949                         <field name="target_copy" reporter:datatype="link"/>
6950                         <field name="usr" reporter:datatype="link"/>
6951                         <field name="xact_finish" reporter:datatype="timestamp" />
6952                         <field name="xact_start" reporter:datatype="timestamp" />
6953                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6954                 </fields>
6955                 <links>
6956                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6957                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6958                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6959                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6960                 </links>
6961         </class>
6962         <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">
6963                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6964                         <field name="field" reporter:datatype="link"/>
6965                         <field name="id" reporter:datatype="id" />
6966                         <field name="source" reporter:datatype="link"/>
6967                         <field name="value" reporter:datatype="text"/>
6968                 </fields>
6969                 <links>
6970                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6971                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6972                 </links>
6973         </class>
6974         <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">
6975                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6976                         <field name="high" reporter:datatype="money" />
6977                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6978                         <field name="low" reporter:datatype="money" />
6979                         <field name="name" reporter:datatype="text"/>
6980                         <field name="normal" reporter:datatype="money" />
6981                         <field name="recurrence_interval" reporter:datatype="interval"/>
6982             <field name="grace_period" reporter:datatype="interval" />
6983                 </fields>
6984                 <links/>
6985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6986             <actions>
6987                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6988                 <retrieve/>
6989                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6990                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6991             </actions>
6992         </permacrud>
6993         </class>
6994         <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">
6995                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6996                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6997                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6998                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6999                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7000                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7001                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7002                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7003                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7004                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7005                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7006                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7007                 </fields>
7008                 <links>
7009                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7010                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7011                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7012                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7013                 </links>
7014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7015             <actions>
7016                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7017                     <context link="xact" jump="usr" field="home_ou"/>
7018                 </retrieve>
7019                         </actions>
7020                 </permacrud>
7021         </class>
7022         <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">
7023                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7024                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7025                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7026                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7027                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7028                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
7029                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7030                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7031                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7032                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7033                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7034                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7035                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7036                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7037                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7038                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7039                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7040                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7041                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7042                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7043                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7044                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7045                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7046                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7047                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7048                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7049                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7050                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7051                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7052                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7053                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7054                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7055                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7056                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7057                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7058                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7059                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7060                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7061                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7062                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7063                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7064                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7065                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7066                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7067                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7068                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7069                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7070                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7071                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7072                 </fields>
7073                 <links>
7074                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7075                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7076                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7077                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7078                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7079                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7080                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7081                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7082                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7083                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7084                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7085                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7086                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7087                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7088                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7089                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7090                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7091                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7092                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7093                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7094                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7095                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7096                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7097                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7098                 </links>
7099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7100             <actions>
7101                 <create permission="CREATE_COPY">
7102                     <context link="call_number" field="owning_lib"/>
7103                 </create>
7104                 <retrieve/>
7105                 <update permission="UPDATE_COPY">
7106                     <context link="call_number" field="owning_lib"/>
7107                 </update>
7108                 <delete permission="DELETE_COPY">
7109                     <context link="call_number" field="owning_lib"/>
7110                 </delete>
7111             </actions>
7112         </permacrud>
7113         </class>
7114
7115         <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">
7116                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7117                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7118                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7119                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7120                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7121                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7122                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7123                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7124                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7125                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7126                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7127                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7128                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7129                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7130                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7131                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7132                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7133                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7134                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7135                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7136                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7137                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7138                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7139                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7140                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7141                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7142                 </fields>
7143                 <links>
7144                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7145                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7146                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7147                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7148                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7149                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7150                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7151                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7152                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7153                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7154                 </links>
7155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7156                         <actions>
7157                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7158                                 <retrieve />
7159                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7160                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7161                         </actions>
7162                 </permacrud>
7163         </class>
7164
7165         <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">
7166                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7167                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7168                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7169                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7170                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7171                 </fields>
7172                 <links/>
7173         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7174             <actions>
7175                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7176                 <retrieve/>
7177                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7178                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7179             </actions>
7180         </permacrud>
7181         </class>
7182         <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">
7183                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7184                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7185                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7186                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7187                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7188                 </fields>
7189                 <links/>
7190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7191             <actions>
7192                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7193                 <retrieve/>
7194                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7195                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7196             </actions>
7197         </permacrud>
7198         </class>
7199         <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">
7200                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7201                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7202                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7203                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7204                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7205                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7206                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7207                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7208                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7209                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7210                 </fields>
7211                 <links>
7212                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7213                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7214                 </links>
7215         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7216             <actions>
7217                 <create permission="CREATE_PERM" global_required="true"/>
7218                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7219                 <update permission="UPDATE_PERM" global_required="true"/>
7220                 <delete permission="DELETE_PERM" global_required="true"/>
7221             </actions>
7222         </permacrud>
7223         </class>
7224         <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">
7225                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7226                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7227                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7228                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7229                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7230                 </fields>
7231                 <links>
7232                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7233                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7234                 </links>
7235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7236             <actions>
7237                 <create permission="ADMIN_SURVEY">
7238                     <context link="question" jump="survey" field="owner"/>
7239                 </create>
7240                 <retrieve/>
7241                 <update permission="ADMIN_SURVEY">
7242                     <context link="question" jump="survey" field="owner"/>
7243                 </update>
7244                 <delete permission="ADMIN_SURVEY">
7245                     <context link="question" jump="survey" field="owner"/>
7246                 </delete>
7247             </actions>
7248         </permacrud>
7249         </class>
7250         <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">
7251                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7252                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7253                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7254                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7255                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7256                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7257                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7258                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7259                 </fields>
7260                 <links>
7261                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7262                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7263                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7264                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7265                 </links>
7266                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7267                         <actions>
7268                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7269                         </actions>
7270                 </permacrud>
7271         </class>
7272         <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">
7273                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7274                         <field name="balance_owed" reporter:datatype="money" />
7275                         <field name="total_owed" reporter:datatype="money" />
7276                         <field name="total_paid" reporter:datatype="money" />
7277                         <field name="usr" reporter:datatype="link"/>
7278                 </fields>
7279                 <links>
7280                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7281                 </links>
7282         </class>
7283         <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">
7284                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7285                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7286                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7287                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7288                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7289                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7290                 </fields>
7291                 <links>
7292                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7293                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7294                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7295                 </links>
7296         </class>
7297         <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">
7298                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7299                         <field name="field" reporter:datatype="link"/>
7300                         <field name="id" reporter:datatype="id" />
7301                         <field name="source" reporter:datatype="link"/>
7302                         <field name="value" reporter:datatype="text"/>
7303                 </fields>
7304                 <links>
7305                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7306                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7307                 </links>
7308         </class>
7309         <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">
7310                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7311                         <field name="field" reporter:datatype="link"/>
7312                         <field name="id" reporter:datatype="id" />
7313                         <field name="source" reporter:datatype="link"/>
7314                         <field name="value" reporter:datatype="text"/>
7315                 </fields>
7316                 <links>
7317                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7318                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7319                 </links>
7320         </class>
7321         <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">
7322                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7323                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7324                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7325                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7326                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7327                 </fields>
7328                 <links>
7329                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7330                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7331                 </links>
7332         </class>
7333         <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">
7334                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7335                         <field name="depth" reporter:datatype="int" />
7336                         <field name="grantable" reporter:datatype="bool"/>
7337                         <field name="grp" reporter:datatype="link"/>
7338                         <field name="id" reporter:datatype="id" />
7339                         <field name="perm" reporter:datatype="link"/>
7340                 </fields>
7341                 <links>
7342                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7343                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7344                 </links>
7345         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7346             <actions>
7347                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7348                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7349                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7350                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7351             </actions>
7352         </permacrud>
7353         </class>
7354         <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">
7355                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7356                         <field name="items" oils_persist:virtual="true" />
7357                         <field name="btype" reporter:datatype="text"/>
7358                         <field name="id" reporter:datatype="id" />
7359                         <field name="name" reporter:datatype="text"/>
7360                         <field name="description" reporter:datatype="text"/>
7361                         <field name="owner" reporter:datatype="link"/>
7362                         <field name="pub" reporter:datatype="bool"/>
7363                         <field name="create_time" reporter:datatype="timestamp" />
7364                         <field name="owning_lib" reporter:datatype="org_unit" />
7365                 </fields>
7366                 <links>
7367                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7368                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7369                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7370                 </links>
7371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7372                         <actions>
7373                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7374                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7375                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7376                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7377                         </actions>
7378                 </permacrud>
7379         </class>
7380         <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">
7381                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7382                         <field name="id" reporter:datatype="id" />
7383                         <field name="bucket" reporter:datatype="link"/>
7384                         <field name="note" reporter:datatype="text" />
7385                 </fields>
7386                 <links>
7387                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7388                 </links>
7389         </class>
7390         <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">
7391                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7392                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7393                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7394                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7395                 </fields>
7396                 <links>
7397                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7398                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7399                 </links>
7400         </class>
7401         <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">
7402                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7403                         <field name="depth" reporter:datatype="int"/>
7404                         <field name="grantable" reporter:datatype="bool"/>
7405                         <field name="id" reporter:datatype="id" />
7406                         <field name="perm" reporter:datatype="link"/>
7407                         <field name="usr" reporter:datatype="link"/>
7408                 </fields>
7409                 <links>
7410                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7411                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7412                 </links>
7413         </class>
7414         <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">
7415                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7416                         <field name="object_id" reporter:datatype="text"/>
7417                         <field name="grantable" reporter:datatype="bool"/>
7418                         <field name="id" reporter:datatype="id" />
7419                         <field name="perm" reporter:datatype="link"/>
7420                         <field name="usr" reporter:datatype="link"/>
7421                         <field name="object_type" reporter:datatype="text"/>
7422                 </fields>
7423                 <links>
7424                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7425                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7426                 </links>
7427         </class>
7428         <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">
7429                 <fields oils_persist:primary="id" oils_persist:sequence="">
7430                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7431                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7432                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7433                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7434                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7435                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7436                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7437                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7438                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7439                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7440                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7441                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7442                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7443                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7444                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7445                 </fields>
7446                 <links>
7447                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7448                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7449                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7450                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7451                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7452                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7453                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7454                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7455                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7456                 </links>
7457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7458             <actions>
7459                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7460                     <context link="xact" jump="usr" field="home_ou"/>
7461                 </retrieve>
7462                         </actions>
7463                 </permacrud>
7464         </class>
7465         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
7466                 <fields oils_persist:primary="id" oils_persist:sequence="">
7467                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7468                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7469                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7470                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7471                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7472                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7473                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7474                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7475                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7476                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7477                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7478                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7479                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7480                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7481                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7482                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7483                 </fields>
7484                 <links>
7485                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7486                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7487                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7488                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7489                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7490                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7491                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7492                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7493                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7494                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7495                 </links>
7496         </class>
7497         <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">
7498                 <fields oils_persist:primary="id" oils_persist:sequence="">
7499                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7500                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7501                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7502                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7503                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7504                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7505                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7506                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7507                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7508                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7509                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7510                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7511                 </fields>
7512                 <links>
7513                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7514                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7515                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7516                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7517                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7518                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7519                 </links>
7520         </class>
7521         <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">
7522                 <fields oils_persist:primary="id" oils_persist:sequence="">
7523                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7524                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7525                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7526                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7527                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7528                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7529                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7530                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7531                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7532                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7533                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7534                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7535                 </fields>
7536                 <links>
7537                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7538                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7539                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7540                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7541                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7542                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7543                 </links>
7544         </class>
7545         <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">
7546                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7547                         <field name="bucket" reporter:datatype="link"/>
7548                         <field name="id" reporter:datatype="id" />
7549                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7550                         <field name="create_time" reporter:datatype="timestamp" />
7551                         <field name="pos" reporter:datatype="int" />
7552                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7553                 </fields>
7554                 <links>
7555                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7556                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7557             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7558                 </links>
7559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7560                         <actions>
7561                                 <retrieve permission="ADMIN_COPY_BUCKET">
7562                     <context link="bucket" owning_lib="owning_lib"/>
7563                 </retrieve>
7564             </actions>
7565         </permacrud>
7566         </class>
7567         <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">
7568                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7569                         <field name="id" reporter:datatype="id" />
7570                         <field name="item" reporter:datatype="link"/>
7571                         <field name="note" reporter:datatype="text" />
7572                 </fields>
7573                 <links>
7574                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7575                 </links>
7576         </class>
7577         <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">
7578                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7579                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7580                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7581                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7582                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7583                 </fields>
7584                 <links>
7585                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7586                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7587                 </links>
7588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7589                         <actions>
7590                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7591                         </actions>
7592                 </permacrud>
7593         </class>
7594     <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">
7595         <fields oils_persist:primary="field">
7596             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7597             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7598             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7599         </fields>
7600         <links/>
7601         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7602             <actions>
7603                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7604                 <retrieve />
7605                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7606                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7607             </actions>
7608         </permacrud>
7609     </class>
7610         <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">
7611                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7612                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7613                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7614                 </fields>
7615                 <links/>
7616         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7617             <actions>
7618                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7619                 <retrieve/>
7620                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7621                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7622             </actions>
7623         </permacrud>
7624         </class>
7625
7626
7627         <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">
7628                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7629                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7630                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7631                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7632                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7633                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7634                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7635                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7636                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7637                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7638                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7639                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7640                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7641                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7642                 </fields>
7643                 <links>
7644                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7645                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7646                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7647                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7648                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7649                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7650                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7651                 </links>
7652         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7653             <actions>
7654                 <create permission="TRANSIT_COPY">
7655                     <context link="target_copy" field="owner"/>
7656                 </create>
7657                 <retrieve/>
7658                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7659                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7660             </actions>
7661         </permacrud>
7662         </class>
7663         <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">
7664                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7665                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7666                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7667                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7668                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7669                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7670                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7671                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7672                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7673                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7674                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7675                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7676                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7677                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7678                 </fields>
7679                 <links>
7680                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7681                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7682                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7683                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7684                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7685                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7686                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7687                 </links>
7688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7689             <actions>
7690                 <create permission="TRANSIT_COPY" context_field="owner">
7691                     <context link="target_copy" field="circ_lib"/>
7692                 </create>
7693                 <retrieve/>
7694                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7695                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7696             </actions>
7697         </permacrud>
7698         </class>
7699         <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">
7700                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7701                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7702                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7703                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7704                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7705                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7706                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7707                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7708                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7709                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7710                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7711                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7712                 </fields>
7713                 <links>
7714                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7715                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7716                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7717                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7718                 </links>
7719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7720             <actions>
7721                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7722                     <context link="xact" jump="usr" field="home_ou"/>
7723                 </retrieve>
7724                         </actions>
7725                 </permacrud>
7726         </class>
7727         <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">
7728                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7729                         <field name="grp" />
7730                         <field name="id" reporter:datatype="id" />
7731                         <field name="usr" />
7732                 </fields>
7733                 <links>
7734                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7735                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7736                 </links>
7737         </class>
7738         <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">
7739                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7740                         <field name="id" reporter:datatype="id" />
7741                         <field name="fq_field" reporter:datatype="text"/>
7742                         <field name="identity_value" reporter:datatype="text"/>
7743                         <field name="translation" reporter:datatype="text"/>
7744                         <field name="string" reporter:datatype="text"/>
7745                 </fields>
7746                 <links>
7747                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7748                 </links>
7749         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7750             <actions>
7751                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7752                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7753                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7754                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7755             </actions>
7756         </permacrud>
7757         </class>
7758         <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">
7759                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7760                         <field name="id" reporter:datatype="id" />
7761                         <field name="fm_class" reporter:datatype="text"/>
7762                         <field name="field" reporter:datatype="text"/>
7763                         <field name="owner" reporter:datatype="org_unit"/>
7764                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7765                 </fields>
7766                 <links>
7767                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7768                 </links>
7769         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7770             <actions>
7771                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7772                 <retrieve/>
7773                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7774                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7775             </actions>
7776         </permacrud>
7777         </class>
7778         <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">
7779                 <fields oils_persist:primary="code">
7780                         <field name="code" reporter:datatype="id" />
7781                         <field name="marc_code" reporter:datatype="text"/>
7782                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7783                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7784                         <field name="rtl" reporter:datatype="bool"/>
7785                 </fields>
7786                 <links/>
7787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7788             <actions>
7789                 <create permission="CREATE_LOCALE" global_required="true"/>
7790                 <retrieve/>
7791                 <update permission="UPDATE_LOCALE" global_required="true"/>
7792                 <delete permission="DELETE_LOCALE" global_required="true"/>
7793             </actions>
7794         </permacrud>
7795         </class>
7796         <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">
7797                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7798                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7799                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7800                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7801             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7802                 </fields>
7803                 <links>
7804                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7805                 </links>
7806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7807             <actions>
7808                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7809                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7810                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7811                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7812             </actions>
7813         </permacrud>
7814         </class>
7815
7816         <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">
7817                 <fields oils_persist:primary="id">
7818                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7819                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7820                 </fields>
7821                 <links/>
7822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7823             <actions>
7824                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7825                 <retrieve/>
7826                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7827                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7828             </actions>
7829         </permacrud>
7830         </class>
7831
7832         <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">
7833                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7834                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7835                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7836                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7837                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7838                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7839                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7840                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7841                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7842                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7843                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7844                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7845                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7846                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7847                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7848                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7849                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7850                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7851                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7852                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7853                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7854                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7855                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7856                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7857                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7858                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7859                 </fields>
7860                 <links>
7861                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7862                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7863                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7864                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7865                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7866                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7867                 </links>
7868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7869             <actions>
7870                 <create permission="user_request.create">
7871                     <context link="usr" field="home_ou"/>
7872                                 </create>
7873                 <retrieve permission="user_request.view">
7874                     <context link="usr" field="home_ou"/>
7875                                 </retrieve>
7876                 <update permission="user_request.update">
7877                     <context link="usr" field="home_ou"/>
7878                                 </update>
7879                 <delete permission="user_request.delete">
7880                     <context link="usr" field="home_ou"/>
7881                                 </delete>
7882             </actions>
7883         </permacrud>
7884         </class>
7885
7886         <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">
7887                 <fields oils_persist:primary="code">
7888                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7889                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7890                 </fields>
7891                 <links/>
7892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7893             <actions>
7894                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7895                 <retrieve/>
7896                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7897                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7898             </actions>
7899         </permacrud>
7900         </class>
7901
7902         <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">
7903                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7904                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7905                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7906                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7907                         <field reporter:label="Ratio" name="ratio" />
7908                 </fields>
7909                 <links>
7910                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7911                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7912                 </links>
7913                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7914                         <actions>
7915                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7916                                 <retrieve/>
7917                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7918                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7919                         </actions>
7920                 </permacrud>
7921         </class>
7922
7923         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7924                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7925                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7926                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7927                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7928                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7929                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7930                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7931                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7932                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7933                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7934                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7935                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7936                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7937                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7938                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7939                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7940                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7941                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7942                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
7943                 </fields>
7944                 <links>
7945                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7946                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7947             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7948             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7949                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7950                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
7951                 </links>
7952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7953             <actions>
7954                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7955                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7956                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7957                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7958             </actions>
7959         </permacrud>
7960         </class>
7961
7962         <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">
7963                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7964                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7965                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7966                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7967                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7968                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7969                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7970                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7971                 </fields>
7972                 <links>
7973                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7974                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7975                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7976                 </links>
7977         </class>
7978
7979         <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">
7980                 <fields oils_persist:primary="code">
7981                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7982                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7983                 </fields>
7984                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7985             <actions>
7986                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7987                 <retrieve/>
7988                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7989                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7990             </actions>
7991                 </permacrud>
7992         </class>
7993
7994         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7995                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7996                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7997                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7998                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7999                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8000                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8001                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8002                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8003                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8004                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8005                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8006                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8007                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
8008                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8009                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8010                 </fields>
8011                 <links>
8012                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8013                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8014                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8015                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8016                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8017                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8018                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8019                 </links>
8020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8021             <actions>
8022                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8023                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8024                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8025                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8026             </actions>
8027         </permacrud>
8028         </class>
8029
8030         <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">
8031                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8032                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8033                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8034                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8035                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8036                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8037                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8038                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8039                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8040                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8041                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8042                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8043                 </fields>
8044                 <links>
8045                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8046                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8047                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8048                 </links>
8049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8050             <actions>
8051                 <create   permission="ADMIN_INVOICE">
8052                                         <context link="invoice" field="receiver"/>
8053                                 </create>
8054                 <retrieve permission="ADMIN_INVOICE">
8055                                         <context link="invoice" field="receiver"/>
8056                                 </retrieve>
8057                 <update   permission="ADMIN_INVOICE">
8058                                         <context link="invoice" field="receiver"/>
8059                                 </update>
8060                                 <delete   permission="ADMIN_INVOICE">
8061                                         <context link="invoice" field="receiver"/>
8062                                 </delete>
8063             </actions>
8064         </permacrud>
8065         </class>
8066
8067         <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">
8068                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8069                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8070                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8071                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8072                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8073                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8074                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8075                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8076                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8077                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8078                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8079                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8080                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8081                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8082                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8083                 </fields>
8084                 <links>
8085                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8086                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8087                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8088                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8089                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8090                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8091                 </links>
8092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8093             <actions>
8094                 <create   permission="ADMIN_INVOICE">
8095                                         <context link="invoice" field="receiver"/>
8096                                 </create>
8097                 <retrieve permission="ADMIN_INVOICE">
8098                                         <context link="invoice" field="receiver"/>
8099                                 </retrieve>
8100                 <update   permission="ADMIN_INVOICE">
8101                                         <context link="invoice" field="receiver"/>
8102                                 </update>
8103                                 <delete   permission="ADMIN_INVOICE">
8104                                         <context link="invoice" field="receiver"/>
8105                                 </delete>
8106             </actions>
8107         </permacrud>
8108         </class>
8109
8110         <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">
8111                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8112                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8113                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8114                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8115                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8116                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8117                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8118                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8119                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8120                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8121                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8122                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8123                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8124                 </fields>
8125                 <links>
8126                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8127                 </links>
8128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8129             <actions>
8130                 <create permission="ADMIN_PROVIDER">
8131                     <context link="provider" field="owner"/>
8132                 </create>
8133                 <retrieve permission="ADMIN_PROVIDER">
8134                     <context link="provider" field="owner"/>
8135                 </retrieve>
8136                 <update permission="ADMIN_PROVIDER">
8137                     <context link="provider" field="owner"/>
8138                 </update>
8139                 <delete permission="ADMIN_PROVIDER">
8140                     <context link="provider" field="owner"/>
8141                 </delete>
8142             </actions>
8143         </permacrud>
8144         </class>
8145
8146         <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">
8147                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8148                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8149                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8150                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8151                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8152                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8153                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8154         </fields>
8155                 <links>
8156                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8157                 </links>
8158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8159             <actions>
8160                 <create permission="ADMIN_PROVIDER">
8161                     <context link="provider" field="owner"/>
8162                 </create>
8163                 <retrieve permission="ADMIN_PROVIDER">
8164                     <context link="provider" field="owner"/>
8165                 </retrieve>
8166                 <update permission="ADMIN_PROVIDER">
8167                     <context link="provider" field="owner"/>
8168                 </update>
8169                 <delete permission="ADMIN_PROVIDER">
8170                     <context link="provider" field="owner"/>
8171                 </delete>
8172             </actions>
8173         </permacrud>
8174     </class>
8175         <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">
8176                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8177                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8178                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8179                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8180                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8181                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8182                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8183                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8184                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8185                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8186                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8187                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8188                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8189                 </fields>
8190                 <links>
8191                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8192                 </links>
8193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8194             <actions>
8195                 <create permission="ADMIN_PROVIDER">
8196                     <context link="contact" jump='provider' field="owner"/>
8197                 </create>
8198                 <retrieve permission="ADMIN_PROVIDER">
8199                     <context link="contact" jump='provider' field="owner"/>
8200                 </retrieve>
8201                 <update permission="ADMIN_PROVIDER">
8202                     <context link="contact" jump='provider' field="owner"/>
8203                 </update>
8204                 <delete permission="ADMIN_PROVIDER">
8205                     <context link="contact" jump='provider' field="owner"/>
8206                 </delete>
8207             </actions>
8208         </permacrud>
8209         </class>
8210
8211         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8212                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8213                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8214                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8215                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8216                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8217                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8218                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8219                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8220                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8221                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8222                 </fields>
8223                 <links>
8224                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8225                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8226                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8227                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8228                 </links>
8229         </class>
8230
8231         <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">
8232                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8233                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8234                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8235                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8236                 </fields>
8237                 <links>
8238             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8239                 </links>
8240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8241                         <actions>
8242                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8243                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8244                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8245                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8246                         </actions>
8247                 </permacrud>
8248         </class>
8249
8250         <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">
8251                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8252                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8253                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8254                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8255                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8256                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8257                 </fields>
8258                 <links>
8259                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8260                 </links>
8261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8262                         <actions>
8263                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8264                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8265                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8266                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8267                         </actions>
8268                 </permacrud>
8269         </class>
8270
8271         <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">
8272                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8273                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8274                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8275                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8276                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8277                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8278                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8279                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8280                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8281                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8282                 </fields>
8283                 <links>
8284                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8285                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8286             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8287             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8288                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8289                 </links>
8290         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8291             <actions>
8292                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8293                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8294                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8295                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8296             </actions>
8297         </permacrud>
8298         </class>
8299
8300         <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">
8301                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8302                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8303                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8304                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8305                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8306                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8307                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8308                 </fields>
8309                 <links>
8310                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8311                 </links>
8312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8313                         <actions>
8314                                 <create permission="ADMIN_FUNDING_SOURCE">
8315                     <context link="funding_source" field="owner"/>
8316                 </create>
8317                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8318                     <context link="funding_source" field="owner"/>
8319                 </retrieve>
8320                                 <update permission="ADMIN_FUNDING_SOURCE">
8321                     <context link="funding_source" field="owner"/>
8322                 </update>
8323                                 <delete permission="ADMIN_FUNDING_SOURCE">
8324                     <context link="funding_source" field="owner"/>
8325                 </delete>
8326                         </actions>
8327                 </permacrud>
8328         </class>
8329
8330         <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">
8331                 <fields oils_persist:primary="id">
8332                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8333                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8334                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8335                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8336                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8337                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8338                 </fields>
8339                 <links>
8340                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8341                 </links>
8342         </class>
8343
8344         <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">
8345                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8346                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8347                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8348                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8349                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8350                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8351                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8352                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8353                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8354                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8355                 </fields>
8356                 <links>
8357                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8358                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8359                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8360                 </links>
8361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8362                         <actions>
8363                                 <create permission="ADMIN_ACQ_FUND">
8364                     <context link="fund" field="org"/>
8365                 </create>
8366                                 <retrieve permission="ADMIN_ACQ_FUND">
8367                     <context link="fund" field="org"/>
8368                 </retrieve>
8369                                 <update permission="ADMIN_ACQ_FUND">
8370                     <context link="fund" field="org"/>
8371                 </update>
8372                                 <delete permission="ADMIN_ACQ_FUND">
8373                     <context link="fund" field="org"/>
8374                 </delete>
8375                         </actions>
8376                 </permacrud>
8377         </class>
8378
8379         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8380                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8381                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8382                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8383                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8384                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8385                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8386                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8387                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8388                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8389                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8390                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8391                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8392                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8393                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8394                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8395                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8396                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8397                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8398                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8399                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8400                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8401                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8402                 </fields>
8403                 <links>
8404                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8405                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8406             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8407             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8408             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8409             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8410             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8411             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8412             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8413             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8414             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8415                 </links>
8416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8417             <actions>
8418                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8419                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8420                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8421                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8422             </actions>
8423         </permacrud>
8424         </class>
8425
8426         <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">
8427                 <fields oils_persist:primary="fund">
8428                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8429                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8430                 </fields>
8431                 <links>
8432                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8433                 </links>
8434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8435             <actions>
8436                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8437                                         <context link="fund" field="org" />
8438                 </retrieve>
8439             </actions>
8440         </permacrud>
8441         </class>
8442
8443         <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">
8444                 <fields oils_persist:primary="fund">
8445                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8446                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8447                 </fields>
8448                 <links>
8449                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8450                 </links>
8451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8452             <actions>
8453                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8454                                         <context link="fund" field="org" />
8455                 </retrieve>
8456             </actions>
8457         </permacrud>
8458         </class>
8459
8460         <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">
8461                 <fields oils_persist:primary="fund">
8462                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8463                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8464                 </fields>
8465                 <links>
8466                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8467                 </links>
8468         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8469             <actions>
8470                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8471                                         <context link="fund" field="org" />
8472                 </retrieve>
8473             </actions>
8474         </permacrud>
8475         </class>
8476
8477         <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">
8478                 <fields oils_persist:primary="fund">
8479                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8480                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8481                 </fields>
8482                 <links>
8483                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8484                 </links>
8485         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8486             <actions>
8487                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8488                                         <context link="fund" field="org" />
8489                 </retrieve>
8490             </actions>
8491         </permacrud>
8492         </class>
8493
8494         <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">
8495                 <fields oils_persist:primary="fund">
8496                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8497                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8498                 </fields>
8499                 <links>
8500                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8501                 </links>
8502         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8503             <actions>
8504                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8505                                         <context link="fund" field="org" />
8506                 </retrieve>
8507             </actions>
8508         </permacrud>
8509         </class>
8510
8511    <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">
8512         <fields oils_persist:primary="fund">
8513             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8514             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8515         </fields>
8516         <links>
8517             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8518         </links>
8519     </class>
8520
8521    <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">
8522         <fields oils_persist:primary="fund">
8523             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8524             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8525         </fields>
8526         <links>
8527             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8528         </links>
8529     </class>
8530
8531    <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">
8532         <fields oils_persist:primary="fund">
8533             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8534             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8535         </fields>
8536         <links>
8537             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8538         </links>
8539     </class>
8540
8541    <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">
8542         <fields oils_persist:primary="fund">
8543             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8544             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8545         </fields>
8546         <links>
8547             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8548         </links>
8549     </class>
8550
8551    <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">
8552         <fields oils_persist:primary="fund">
8553             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8554             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8555         </fields>
8556         <links>
8557             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8558         </links>
8559     </class>
8560
8561         <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">
8562                 <fields oils_persist:primary="funding_source">
8563                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8564                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8565                 </fields>
8566                 <links>
8567                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8568                 </links>
8569         </class>
8570
8571         <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">
8572                 <fields oils_persist:primary="funding_source">
8573                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8574                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8575                 </fields>
8576                 <links>
8577                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8578                 </links>
8579         </class>
8580
8581         <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">
8582                 <fields oils_persist:primary="funding_source">
8583                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8584                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8585                 </fields>
8586                 <links>
8587                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8588                 </links>
8589         </class>
8590
8591         <class id="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">
8592                 <fields oils_persist:primary="fund">
8593                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8594                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8595                 </fields>
8596                 <links>
8597                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8598                 </links>
8599         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8600             <actions>
8601                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8602                                         <context link="fund" field="org" />
8603                 </retrieve>
8604             </actions>
8605         </permacrud>
8606     </class>
8607     <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">
8608         <oils_persist:source_definition><![CDATA[
8609             SELECT
8610                 acqf.*,
8611                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8612                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8613                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8614                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8615             FROM
8616                 acq.fund acqf
8617                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8618                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8619                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8620                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8621         ]]></oils_persist:source_definition>
8622         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8623             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8624             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8625             <field reporter:label="Name" name="name" reporter:datatype="text" />
8626             <field reporter:label="Year" name="year" reporter:datatype="int" />
8627             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8628             <field reporter:label="Code" name="code" reporter:datatype="text" />
8629             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8630             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8631             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8632             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8633             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8634
8635             <!-- non fund-native fields -->
8636             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8637             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8638             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8639             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8640         </fields>
8641         <links>
8642             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8643             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8644             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8645         </links>
8646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8647             <actions>
8648                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8649             </actions>
8650         </permacrud>
8651         </class>
8652         <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">
8653                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8654                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8655                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8656                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8657                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8658                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8659                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8660                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8661                 </fields>
8662                 <links>
8663                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8664                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8665                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8666                 </links>
8667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8668                         <actions>
8669                                 <create permission="ADMIN_ACQ_FUND">
8670                     <context link="fund" field="org"/>
8671                 </create>
8672                                 <retrieve permission="ADMIN_ACQ_FUND">
8673                     <context link="fund" field="org"/>
8674                 </retrieve>
8675                                 <update permission="ADMIN_ACQ_FUND">
8676                     <context link="fund" field="org"/>
8677                 </update>
8678                                 <delete permission="ADMIN_ACQ_FUND">
8679                     <context link="fund" field="org"/>
8680                 </delete>
8681                         </actions>
8682                 </permacrud>
8683         </class>
8684
8685     <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">
8686         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8687             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8688             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8689             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8690             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8691             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8692             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8693             <field reporter:label="Note" name="note" reporter:datatype="text" />
8694             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8695         </fields>
8696         <links>
8697             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8698             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8699             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8700         </links>
8701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8702                         <actions>
8703                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8704                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8705                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8706                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8707                         </actions>
8708                 </permacrud>
8709     </class>
8710
8711         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8712                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8713                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8714                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8715                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8716                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8717                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8718                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8719                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8720                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8721                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8722                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8723                 </fields>
8724                 <links>
8725                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8726                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8727                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8728                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8729                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8730                 </links>
8731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8732                         <actions>
8733                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8734                         </actions>
8735                 </permacrud>
8736         </class>
8737
8738         <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">
8739                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8740                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8741                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8742                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8743                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8744                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8745                 </fields>
8746                 <links>
8747                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8748                 </links>
8749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8750                         <actions>
8751                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8752                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8753                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8754                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8755                         </actions>
8756                 </permacrud>
8757         </class>
8758
8759         <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">
8760                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8761                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8762                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8763                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8764                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8765                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8766                         <field reporter:label="State" name="state" reporter:datatype="text" />
8767                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8768                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8769                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8770                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8771                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8772                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8773                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8774                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8775                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8776                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8777                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8778                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8779                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8780                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8781                 </fields>
8782                 <links>
8783                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8784                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8785                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8786                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8787                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8788                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8789                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8790                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8791                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8792                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8793                 </links>
8794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8795                         <actions>
8796                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8797                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8798                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8799                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8800                         </actions>
8801                 </permacrud>
8802         </class>
8803
8804         <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">
8805                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8806                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8807                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8808                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8809                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8810                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8811                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8812                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8813                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8814                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8815                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8816                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8817                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8818                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8819                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8820                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8821                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8822                 </fields>
8823                 <links>
8824                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8825                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8826                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8827                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8828                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8829                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8830                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8831                 </links>
8832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8833             <actions>
8834                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8835             </actions>
8836                 </permacrud>
8837         </class>
8838
8839         <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">
8840                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8841                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8842                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8843                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8844                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8845                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8846                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8847                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8848                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8849                 </fields>
8850                 <links>
8851                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8852                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8853                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8854                 </links>
8855                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8856             <actions>
8857                 <create permission="CREATE_PURCHASE_ORDER">
8858                     <context link="purchase_order" field="ordering_agency"/>
8859                 </create>
8860                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8861                     <context link="purchase_order" field="ordering_agency"/>
8862                 </retrieve>
8863                 <update permission="CREATE_PURCHASE_ORDER">
8864                     <context link="purchase_order" field="ordering_agency"/>
8865                 </update>
8866                 <delete permission="CREATE_PURCHASE_ORDER">
8867                     <context link="purchase_order" field="ordering_agency"/>
8868                 </delete>
8869             </actions>
8870                 </permacrud>
8871         </class>
8872
8873         <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">
8874                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8875                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8876                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8877                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8878                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8879                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8880                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8881                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8882                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8883                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8884                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8885                 </fields>
8886                 <links>
8887                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8888                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8889                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8890                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8891                 </links>
8892                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8893             <actions>
8894                 <create permission="CREATE_PURCHASE_ORDER">
8895                     <context link="purchase_order" field="ordering_agency"/>
8896                 </create>
8897                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8898                     <context link="purchase_order" field="ordering_agency"/>
8899                 </retrieve>
8900                 <update permission="CREATE_PURCHASE_ORDER">
8901                     <context link="purchase_order" field="ordering_agency"/>
8902                 </update>
8903                 <delete permission="CREATE_PURCHASE_ORDER">
8904                     <context link="purchase_order" field="ordering_agency"/>
8905                 </delete>
8906             </actions>
8907                 </permacrud>
8908         </class>
8909
8910         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8911                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8912                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8913                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8914                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8915                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8916                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8917                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8918                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8919                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8920                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8921                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8922                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8923                         <field reporter:label="State" name="state" reporter:datatype="text" />
8924                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8925                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8926                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8927                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8928                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8929                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8930                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8931                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8932                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8933                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8934                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8935                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8936                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8937                 </fields>
8938                 <links>
8939                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8940                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8941                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8942                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8943                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8944                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8945                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8946                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8947                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8948                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8949                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8950                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8951                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8952                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8953                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8954                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8955                 </links>
8956                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8957                         <actions>
8958                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8959                                         <context link="purchase_order" field="ordering_agency"/>
8960                                         <context link="picklist" field="org_unit"/>
8961                                 </retrieve>
8962                         </actions>
8963                 </permacrud>
8964         </class>
8965
8966         <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">
8967                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8968                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8969                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8970                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8971                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8972                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8973                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8974                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8975                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8976                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8977                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8978                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8979                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8980                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8981                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8982                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8983                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8984                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8985                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8986                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8987                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8988                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8989                 </fields>
8990                 <links>
8991                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8992                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8993                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8994                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8995                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8996                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8997                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8998                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8999                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9000                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9001                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9002                 </links>
9003                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9004                         <actions>
9005                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9006                                         <context link="purchase_order" field="ordering_agency"/>
9007                                         <context link="picklist" field="org_unit"/>
9008                                 </retrieve>
9009                         </actions>
9010                 </permacrud>
9011         </class>
9012
9013         <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">
9014                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9015                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9016                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9017                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9018                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9019                 </fields>
9020                 <links>
9021                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9022                 </links>
9023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9024                         <actions>
9025                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9026                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9027                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9028                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9029                         </actions>
9030                 </permacrud>
9031         </class>
9032
9033         <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">
9034                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9035                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9036                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9037                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9038                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9039                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9040                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9041                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9042                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9043                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9044                 </fields>
9045                 <links>
9046                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9047                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9048                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9049                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9050                 </links>
9051         </class>
9052
9053         <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">
9054                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9055                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9056                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9057                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9058                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9059                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9060                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9061                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9062                 </fields>
9063                 <links>
9064                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9065                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9066                 </links>
9067         </class>
9068
9069         <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">
9070                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9071                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9072                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9073                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9074                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9075                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9076                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9077                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9078                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9079                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9080                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9081                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9082                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9083                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9084                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9085                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9086                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9087                 </fields>
9088                 <links>
9089                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9090                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9091                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9092                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9093                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9094                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9095                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9096                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9097                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9098                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9099                 </links>
9100         </class>
9101
9102         <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">
9103                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9104                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9105                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9106                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9107                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9108                 </fields>
9109                 <links/>
9110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9111                         <actions>
9112                                 <retrieve />
9113                         </actions>
9114                 </permacrud>
9115         </class>
9116
9117         <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">
9118                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9119                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9120                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9121                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9122                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9123                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9124             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9125                 </fields>
9126                 <links/>
9127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9128             <actions>
9129                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9130                 <retrieve />
9131                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9132                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9133             </actions>
9134         </permacrud>
9135         </class>
9136
9137         <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">
9138                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9139                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9140                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9141                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9142                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9143                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9144                 </fields>
9145                 <links/>
9146         </class>
9147         <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">
9148                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9149                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9150                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9151                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9152                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9153                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9154                 </fields>
9155                 <links>
9156                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9157                 </links>
9158         </class>
9159
9160         <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">
9161             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9162                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9163                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9164                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9165                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9166                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9167                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9168         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9169
9170             </fields>
9171             <links>
9172                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9173             </links>
9174             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9175                 <actions>
9176                     <create permission="ADMIN_PROVIDER">
9177                         <context link="provider" field="owner"/>
9178                     </create>
9179                     <retrieve permission="ADMIN_PROVIDER">
9180                         <context link="provider" field="owner"/>
9181                     </retrieve>
9182                     <update permission="ADMIN_PROVIDER">
9183                         <context link="provider" field="owner"/>
9184                     </update>
9185                     <delete permission="ADMIN_PROVIDER">
9186                         <context link="provider" field="owner"/>
9187                     </delete>
9188                 </actions>
9189             </permacrud>
9190         </class>
9191         
9192         <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">
9193             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9194                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9195                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9196                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9197                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9198             </fields>
9199             <links>
9200                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9201             </links>
9202             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9203                 <actions>
9204                     <create permission="ADMIN_PROVIDER">
9205                         <context link="provider" field="owner"/>
9206                     </create>
9207                     <retrieve permission="ADMIN_PROVIDER">
9208                         <context link="provider" field="owner"/>
9209                     </retrieve>
9210                     <update permission="ADMIN_PROVIDER">
9211                         <context link="provider" field="owner"/>
9212                     </update>
9213                     <delete permission="ADMIN_PROVIDER">
9214                         <context link="provider" field="owner"/>
9215                     </delete>
9216                 </actions>
9217             </permacrud>
9218         </class>
9219         
9220         <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">
9221             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9222                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9223                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9224                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9225                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9226                 </fields>
9227                 <links/>
9228         </class>
9229
9230         <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">
9231                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9232                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9233                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9234                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9235                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9236                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9237                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9238                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9239                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9240                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9241                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9242                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9243                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9244                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9245                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9246                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9247                 </fields>
9248                 <links>
9249                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9251                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9252                 </links>
9253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9254             <actions>
9255                 <create permission="ADMIN_PROVIDER">
9256                     <context link="provider" field="owner"/>
9257                 </create>
9258                 <retrieve permission="ADMIN_PROVIDER">
9259                     <context link="provider" field="owner"/>
9260                 </retrieve>
9261                 <update permission="ADMIN_PROVIDER">
9262                     <context link="provider" field="owner"/>
9263                 </update>
9264                 <delete permission="ADMIN_PROVIDER">
9265                     <context link="provider" field="owner"/>
9266                 </delete>
9267             </actions>
9268         </permacrud>
9269         </class>
9270
9271         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9272                 oils_obj:fieldmapper="acq::edi_attr" 
9273                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9274                 <fields oils_persist:primary="key">
9275                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9276                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9277                 </fields>
9278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9279             <actions>
9280                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9281                 <retrieve/>
9282                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9283                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9284             </actions>
9285         </permacrud>
9286         </class>
9287         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9288                 oils_obj:fieldmapper="acq::edi_attr_set" 
9289                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9290                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9291                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9292                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9293                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9294                 </fields>
9295                 <links>
9296                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9297                 </links>
9298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9299             <actions>
9300                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9301                 <retrieve/>
9302                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9303                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9304             </actions>
9305         </permacrud>
9306         </class>
9307         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9308                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9309                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9310                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9311                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9312                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9313                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9314                 </fields>
9315                 <links>
9316                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9317                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9318                 </links>
9319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9320             <actions>
9321                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9322                 <retrieve/>
9323                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9324                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9325             </actions>
9326         </permacrud>
9327         </class>
9328
9329
9330         <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">
9331                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9332                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9333                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9334                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9335                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9336                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9337                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9338                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9339                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9340                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9341                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9342                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9343                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9344                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9345                 </fields>
9346                 <links>
9347                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9348                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9349                 </links>
9350         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9351             <actions>
9352                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9353                     <context link="account" jump="provider" field="owner"/>
9354                 </retrieve>
9355                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9356                     <context link="account" jump="provider" field="owner"/>
9357                 </update>
9358                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9359                     <context link="account" jump="provider" field="owner"/>
9360                 </delete>
9361             </actions>
9362         </permacrud>
9363         </class>
9364
9365
9366         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9367                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9368                         <field name="id" reporter:datatype="id" />
9369                         <field name="parent" reporter:datatype="link"/>
9370                         <field name="owner" reporter:datatype="link"/>
9371                         <field name="create_time" reporter:datatype="timestamp"/>
9372                         <field name="name" reporter:datatype="text"/>
9373                         <field name="shared" reporter:datatype="bool"/>
9374                         <field name="share_with" reporter:datatype="link"/>
9375                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9376                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9377                 </fields>
9378                 <links>
9379                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9380                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9381                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9382                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9383                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9384                 </links>
9385         </class>
9386         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9387                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9388                         <field name="id" reporter:datatype="id" />
9389                         <field name="parent" reporter:datatype="link"/>
9390                         <field name="owner" reporter:datatype="link"/>
9391                         <field name="create_time" reporter:datatype="timestamp"/>
9392                         <field name="name" reporter:datatype="text"/>
9393                         <field name="shared" reporter:datatype="bool"/>
9394                         <field name="share_with" reporter:datatype="link"/>
9395                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9396                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9397                 </fields>
9398                 <links>
9399                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9400                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9401                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9402                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9403                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9404                 </links>
9405         </class>
9406         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9407                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9408                         <field name="id" reporter:datatype="id" />
9409                         <field name="parent" reporter:datatype="link"/>
9410                         <field name="owner" reporter:datatype="link"/>
9411                         <field name="create_time" reporter:datatype="timestamp"/>
9412                         <field name="name" reporter:datatype="text"/>
9413                         <field name="shared" reporter:datatype="bool"/>
9414                         <field name="share_with" reporter:datatype="link"/>
9415                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9416                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9417                 </fields>
9418                 <links>
9419                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9420                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9421                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9422                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9423                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9424                 </links>
9425         </class>
9426         <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">
9427                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9428                         <field name="id" reporter:datatype="id" />
9429                         <field name="owner" reporter:datatype="link"/>
9430                         <field name="create_time" reporter:datatype="timestamp"/>
9431                         <field name="name" reporter:datatype="text"/>
9432                         <field name="data" reporter:datatype="text"/>
9433                         <field name="folder" reporter:datatype="link"/>
9434                         <field name="description" reporter:datatype="text"/>
9435                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9436                 </fields>
9437                 <links>
9438                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9439                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9440                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9441                 </links>
9442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9443             <actions>
9444                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9445                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9446                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9447                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9448             </actions>
9449         </permacrud>
9450         </class>
9451         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9452                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9453                         <field name="id" reporter:datatype="id" />
9454                         <field name="owner" reporter:datatype="link"/>
9455                         <field name="create_time" reporter:datatype="timestamp"/>
9456                         <field name="template" reporter:datatype="link"/>
9457                         <field name="data" reporter:datatype="text"/>
9458                         <field name="folder" reporter:datatype="link"/>
9459                         <field name="recur" reporter:datatype="bool"/>
9460                         <field name="recurrence" reporter:datatype="interval"/>
9461                         <field name="name" reporter:datatype="text"/>
9462                         <field name="description" reporter:datatype="text"/>
9463                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9464                 </fields>
9465                 <links>
9466                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9467                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9468                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9469                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9470                 </links>
9471         </class>
9472         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9473                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9474                         <field name="id" reporter:datatype="id" />
9475                         <field name="runner" reporter:datatype="link"/>
9476                         <field name="start_time" reporter:datatype="timestamp"/>
9477                         <field name="complete_time" reporter:datatype="timestamp"/>
9478                         <field name="run_time" reporter:datatype="timestamp"/>
9479                         <field name="email" reporter:datatype="text"/>
9480                         <field name="excel_format" reporter:datatype="bool"/>
9481                         <field name="csv_format" reporter:datatype="bool"/>
9482                         <field name="html_format" reporter:datatype="bool"/>
9483                         <field name="error_code" reporter:datatype="int"/>
9484                         <field name="error_text" reporter:datatype="text"/>
9485                         <field name="report" reporter:datatype="link"/>
9486                         <field name="folder" reporter:datatype="link"/>
9487                         <field name="chart_pie" reporter:datatype="bool"/>
9488                         <field name="chart_bar" reporter:datatype="bool"/>
9489                         <field name="chart_line" reporter:datatype="bool"/>
9490                 </fields>
9491                 <links>
9492                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9493                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9494                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9495                 </links>
9496         </class>
9497         <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">
9498                 <fields oils_persist:primary="id">
9499                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9500                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9501                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9502                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9503                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9504                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9505                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9506                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9507                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9508                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9509                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9510                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9511                 </fields>
9512                 <links>
9513                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9514                 </links>
9515                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9516                         <actions>
9517                                 <retrieve />
9518                         </actions>
9519                 </permacrud>
9520         </class>
9521         <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">
9522                 <fields oils_persist:primary="id">
9523                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9524                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9525                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9526                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9527                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9528                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9529                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9530                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9531                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9532                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9533                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9534                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9535                 </fields>
9536                 <links>
9537                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9538                 </links>
9539         </class>
9540         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9541                 <fields oils_persist:primary="id">
9542                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9543                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9544                         <field reporter:label="Fingerprint" name="fingerprint" />
9545                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9546                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9547                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9548                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9549                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9550                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9551                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9552                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9553                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9554                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9555                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9556                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9557                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9558                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9559                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9560                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9561                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9562                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9563                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9564                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9565                 </fields>
9566                 <links>
9567                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9568                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9569                 </links>
9570         </class>
9571         <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">
9572                 <fields oils_persist:primary="id">
9573                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9574                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9575                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9576                 </fields>
9577                 <links>
9578                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9579                 </links>
9580         </class>
9581         <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">
9582                 <fields oils_persist:primary="id">
9583                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9584                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9585                 </fields>
9586                 <links>
9587                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9588                 </links>
9589         </class>
9590         <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">
9591                 <fields oils_persist:primary="id">
9592                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9593                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9594                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9595                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9596                 </fields>
9597                 <links>
9598                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9599                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9600                 </links>
9601         </class>
9602         <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">
9603                 <fields oils_persist:primary="xact">
9604                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9605                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9606                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9607                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9608                 </fields>
9609                 <links>
9610                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9611                 </links>
9612         </class>
9613         <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">
9614                 <fields oils_persist:primary="xact">
9615                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9616                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9617                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9618                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9619                 </fields>
9620                 <links>
9621                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9622                 </links>
9623         </class>
9624         <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)">
9625                 <fields oils_persist:primary="id">
9626                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9627                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9628                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9629                 </fields>
9630                 <links>
9631                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9632                 </links>
9633         </class>
9634         <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">
9635                 <fields oils_persist:primary="id">
9636                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9637                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9638                 </fields>
9639                 <links>
9640                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9641                 </links>
9642         </class>
9643         <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">
9644                 <fields oils_persist:primary="bibid">
9645                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
9646                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
9647                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
9648                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
9649                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
9650                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
9651                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
9652                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
9653                 </fields>
9654                 <links>
9655                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
9656                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9657                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9658                 </links>
9659         </class>
9660         <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">
9661                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9662                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9663                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9664                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9665                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9666                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9667                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9668                 </fields>
9669                 <links>
9670                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9671                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9672                 </links>
9673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9674                         <actions>
9675                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9676                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9677                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9678                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9679                         </actions>
9680                 </permacrud>
9681         </class>
9682         <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">
9683                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9684                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9685                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9686                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9687                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9688                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9689                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9690                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9691                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9692                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9693                 </fields>
9694                 <links>
9695                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9696                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9697                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9698                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9699                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9700                 </links>
9701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9702                         <actions>
9703                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9704                                         <context link="formula" field="owner"/>
9705                                 </create>
9706                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9707                                         <context link="formula" field="owner"/>
9708                                 </retrieve>
9709                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9710                                         <context link="formula" field="owner"/>
9711                                 </update>
9712                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9713                                         <context link="formula" field="owner"/>
9714                                 </delete>
9715                         </actions>
9716                 </permacrud>
9717         </class>
9718
9719         <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">
9720                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9721                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9722                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9723                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9724                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9725                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9726                 </fields>
9727                 <links>
9728                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9729                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9730                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9731                 </links>
9732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9733                         <actions>
9734                                 <create permission="CREATE_PURCHASE_ORDER">
9735                                         <context link="formula" field="owner"/>
9736                 </create>
9737                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9738                                         <context link="formula" field="owner"/>
9739                 </retrieve>
9740                                 <update permission="CREATE_PURCHASE_ORDER">
9741                                         <context link="formula" field="owner"/>
9742                 </update>
9743                                 <delete permission="CREATE_PURCHASE_ORDER">
9744                                         <context link="formula" field="owner"/>
9745                 </delete>
9746                         </actions>
9747                 </permacrud>
9748         </class>
9749
9750         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9751                 <fields oils_persist:primary="id">
9752                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9753                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9754                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9755                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9756                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9757                 </fields>
9758                 <links>
9759                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9760                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9761                 </links>
9762         </class>
9763
9764         <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">
9765                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9766                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9767                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9768                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9769                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9770                 </fields>
9771                 <links>
9772                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9773                 </links>
9774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9775                         <actions>
9776                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9777                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9778                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9779                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9780                         </actions>
9781                 </permacrud>
9782         </class>
9783
9784         <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">
9785                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9786                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9787                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9788                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9789                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9790                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9791                 </fields>
9792                 <links>
9793                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9794                 </links>
9795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9796                         <actions>
9797                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9798                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9799                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9800                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9801                         </actions>
9802                 </permacrud>
9803         </class>
9804
9805         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9806                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9807                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9808                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9809                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9810                 </fields>
9811                 <links>
9812                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9813                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9814                 </links>
9815         </class>
9816
9817         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9818                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9819                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9820                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9821                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9822                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9823                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9824                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9825                 </fields>
9826                 <links>
9827                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9828                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9829                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9830                 </links>
9831         </class>
9832
9833         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9834                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9835                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9836                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9837                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9838                 </fields>
9839                 <links>
9840                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9841                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9842                 </links>
9843         </class>
9844
9845         <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">
9846                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9847                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9848                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9849                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9850                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9851                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9852                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9853                 </fields>
9854                 <links>
9855                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9856                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9857                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9858                 </links>
9859         </class>
9860
9861         <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">
9862                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9863                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9864                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9865                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9866                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9867                 </fields>
9868                 <links>
9869                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9870                 </links>
9871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9872             <actions>
9873                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9874                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9875                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9876                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9877             </actions>
9878                 </permacrud>
9879         </class>
9880
9881         <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">
9882                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9883                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9884                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9885                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9886                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9887                 </fields>
9888                 <links>
9889                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9890                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9891                 </links>
9892                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9893                         <actions>
9894                                 <create permission="ADMIN_CLAIM_POLICY">
9895                                         <context link="claim_policy" field="org_unit"/>
9896                 </create>
9897                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9898                                         <context link="claim_policy" field="org_unit"/>
9899                 </retrieve>
9900                                 <update permission="ADMIN_CLAIM_POLICY">
9901                                         <context link="claim_policy" field="org_unit"/>
9902                 </update>
9903                                 <delete permission="ADMIN_CLAIM_POLICY">
9904                                         <context link="claim_policy" field="org_unit"/>
9905                 </delete>
9906                         </actions>
9907                 </permacrud>
9908         </class>
9909
9910     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9911         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9912             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9913             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9914             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9915             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9916             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9917             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9918             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9919             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9920             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9921             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9922             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9923             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9924             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9925             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9926             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9927             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9928         </fields>
9929         <links>
9930             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9931         </links>
9932     </class>
9933
9934     <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">
9935         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9936             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9937             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9938             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9939             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9940             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9941         </fields>
9942     </class>
9943
9944     <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">
9945         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9946             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9947             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9948             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9949             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9950             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9951             <field reporter:label="City" name="city" reporter:datatype="text"/>
9952             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9953             <field reporter:label="State" name="state" reporter:datatype="text"/>
9954             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9955             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9956             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9957         </fields>
9958     </class>
9959
9960     <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">
9961         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9962             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9963             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9964             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9965             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9966             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9967             <field reporter:label="City" name="city" reporter:datatype="text"/>
9968             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9969             <field reporter:label="State" name="state" reporter:datatype="text"/>
9970             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9971             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9972             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9973         </fields>
9974     </class>
9975
9976     <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">
9977         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9978             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9979             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9980             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9981             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9982             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9983             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9984         </fields>
9985     </class>
9986
9987     <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">
9988         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
9989             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9990             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9991             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9992             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
9993             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
9994             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9995         </fields>
9996     </class>
9997
9998         <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">
9999                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10000                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10001                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10002                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10003                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10004                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10005                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10006                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10007                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10008                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10009                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10010                 </fields>
10011                 <links>
10012                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10013                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10014                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10015                 </links>
10016                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10017                         <actions>
10018                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10019                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10020                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10021                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10022                         </actions>
10023                 </permacrud>
10024         </class>
10025
10026         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10027                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10028                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10029                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10030                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10031                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10032                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10033                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10034                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10035                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10036                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10037                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10038                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10039                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10040                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10041                 </fields>
10042                 <links>
10043                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10044                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10045                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10046                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10047                 </links>
10048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10049                         <actions>
10050                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10051                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10052                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10053                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10054                         </actions>
10055                 </permacrud>
10056         </class>
10057
10058         <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">
10059                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10060                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10061                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10062                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10063                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10064                 </fields>
10065                 <links>
10066                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10067                 </links>
10068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10069                         <actions>
10070                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10071                     <context link="fieldset" field="owning_lib"/>
10072                 </create>
10073                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10074                     <context link="fieldset" field="owning_lib"/>
10075                 </retrieve>
10076                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10077                     <context link="fieldset" field="owning_lib"/>
10078                 </update>
10079                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10080                     <context link="fieldset" field="owning_lib"/>
10081                 </delete>
10082                         </actions>
10083                 </permacrud>
10084         </class>
10085
10086     <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">
10087         <fields>
10088             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10089             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10090             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10091         </fields>
10092                 <links>
10093                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10094                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10095                 </links>
10096     </class>
10097
10098     <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">
10099         <fields>
10100             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10101             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10102         </fields>
10103                 <links>
10104                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10105                 </links>
10106     </class>
10107
10108     <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">
10109         <fields>
10110             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10111             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10112             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10113         </fields>
10114                 <links>
10115                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10116                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10117                 </links>
10118     </class>
10119
10120     <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">
10121         <fields>
10122             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10123             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10124         </fields>
10125                 <links>
10126                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10127                 </links>
10128     </class>
10129
10130     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10131                 <oils_persist:source_definition>
10132
10133             SELECT  DISTINCT l.*
10134               FROM  action.unfulfilled_hold_loops l
10135                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10136               WHERE l.count = m.max
10137
10138                 </oils_persist:source_definition>
10139         <fields>
10140             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10141             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10142             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10143         </fields>
10144                 <links>
10145                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10146                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10147                 </links>
10148     </class>
10149
10150         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10151                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10152                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10153                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10154                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10155                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10156                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10157                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10158                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10159                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10160                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10161                 </fields>
10162                 <links>
10163                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10164                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10165                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10166                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10167                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10168                 </links>
10169         </class>
10170
10171         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10172                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10173                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10174                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10175                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10176                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10177                 </fields>
10178                 <links>
10179                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10180                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10181                 </links>
10182         </class>
10183
10184         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10185                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10186                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10187                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10188                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10189                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10190                 </fields>
10191                 <links>
10192                 </links>
10193         </class>
10194
10195         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10196                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10197                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10198                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10199                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10200                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10201                 </fields>
10202                 <links>
10203                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10204                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10205                 </links>
10206         </class>
10207         
10208         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10209                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10210                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10211                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10212                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10213                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10214                 </fields>
10215                 <links>
10216                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10217                 </links>
10218         </class>
10219         
10220         <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">
10221                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10222                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10223                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10224                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10225                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10226                 </fields>
10227                 <links>
10228                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10229                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10230                 </links>
10231         </class>
10232
10233         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10234                 <fields oils_persist:primary="name">
10235                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10236                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10237                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10238                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10239                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10240                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10241                 </fields>
10242                 <links>
10243                 </links>
10244         </class>
10245
10246         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10247                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10248                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10249                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10250                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10251                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10252                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10253                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10254                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10255                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10256                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10257                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10258                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10259                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10260                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10261                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10262                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10263                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10264                 </fields>
10265                 <links>
10266                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10267                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10268                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10269                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10270                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10271                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10272                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10273                 </links>
10274         </class>
10275
10276         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10277                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10278                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10279                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10280                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10281                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10282                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10283                 </fields>
10284                 <links>
10285                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10286                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10287                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10288                 </links>
10289         </class>
10290
10291         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10292                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10293                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10294                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10295                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10296                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10297                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10298                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10299                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10300                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10301                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10302                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10303                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10304                 </fields>
10305                 <links>
10306                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10307                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10308                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10309                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10310                 </links>
10311         </class>
10312
10313         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10314                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10315                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10316                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10317                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10318                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10319                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10320                 </fields>
10321                 <links>
10322                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10323                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10324                 </links>
10325         </class>
10326
10327         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10328                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10329                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10330                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10331                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10332                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10333                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10334                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10335                 </fields>
10336                 <links>
10337                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10338                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10339                 </links>
10340         </class>
10341
10342         <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">
10343                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10344                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10345                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10346                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10347                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10348                 </fields>
10349                 <links>
10350                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10351                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10352                 </links>
10353         </class>
10354
10355         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10356                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10357                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10358                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10359                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10360                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10361                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10362                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10363                 </fields>
10364                 <links>
10365                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10366                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10367                 </links>
10368         </class>
10369
10370         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10371                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10372                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10373                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10374                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10375                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10376                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10377                 </fields>
10378                 <links>
10379                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10380                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10381                 </links>
10382         </class>
10383
10384         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10385                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10386                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10387                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10388                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10389                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10390                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10391                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10392                 </fields>
10393                 <links>
10394                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10395                 </links>
10396         </class>
10397
10398         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10399                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10400                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10401                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10402                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10403                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10404                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10405                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10406                 </fields>
10407                 <links>
10408                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10409                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10410                 </links>
10411         </class>
10412
10413         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10414                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10415                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10416                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10417                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10418                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10419                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10420                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10421                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10422                 </fields>
10423                 <links>
10424                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10425                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10426                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10427                 </links>
10428         </class>
10429
10430         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10431                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10432                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10433                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10434                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10435                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10436                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10437                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10438                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10439                 </fields>
10440                 <links>
10441                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10442                 </links>
10443         </class>
10444
10445         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10446                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10447                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10448                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10449                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10450                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10451                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10452                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10453                 </fields>
10454                 <links>
10455                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10456                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10457                 </links>
10458         </class>
10459
10460         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10461                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10462                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10463                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10464                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10465                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10466                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10467                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10468                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10469                 </fields>
10470                 <links>
10471                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10472                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10473                 </links>
10474         </class>
10475
10476         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10477                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10478                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10479                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10480                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10481                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10482                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10483                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10484                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10485                 </fields>
10486                 <links>
10487                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10488                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10489                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10490                 </links>
10491         </class>
10492
10493         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10494                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10495                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10496                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10497                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10498                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10499                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10500                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10501                 </fields>
10502                 <links>
10503                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10504                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10505                 </links>
10506         </class>
10507
10508         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10509                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10510                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10511                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10512                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10513                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10514                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10515                 </fields>
10516                 <links>
10517                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10518                 </links>
10519         </class>
10520
10521         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10522                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10523                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10524                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10525                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10526                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10527                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10528                 </fields>
10529                 <links>
10530                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10531                 </links>
10532         </class>
10533
10534         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10535                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10536                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10537                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10538                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10539                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10540                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10541                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10542                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10543                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10544                 </fields>
10545                 <links>
10546                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10547                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10548                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10549                 </links>
10550         </class>
10551
10552         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10553                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10554                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10555                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10556                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10557                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10558                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10559                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10560                 </fields>
10561                 <links>
10562                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10563                 </links>
10564         </class>
10565
10566         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10567                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10568                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10569                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10570                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10571                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10572                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10573                 </fields>
10574                 <links>
10575                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10576                 </links>
10577         </class>
10578
10579         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10580                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10581                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10582                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10583                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10584                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10585                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10586                 </fields>
10587                 <links>
10588                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10589                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10590                 </links>
10591         </class>
10592
10593         <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">
10594                 <fields oils_persist:primary="id">
10595                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10596                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10597                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10598                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10599                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10600                 </fields>
10601                 <links>
10602                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10603                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10604                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10605                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10606                 </links>
10607         </class>
10608
10609         <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">
10610                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10612                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10613                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10614                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10615                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10616                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10617                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10618                 </fields>
10619                 <links/>
10620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10621                         <actions>
10622                                 <retrieve/>
10623                         </actions>
10624                 </permacrud>
10625         </class>
10626
10627         <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">
10628                 <fields oils_persist:primary="ptype_key">
10629                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10630                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10631                 </fields>
10632                 <links/>
10633                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10634                         <actions>
10635                                 <retrieve/>
10636                         </actions>
10637                 </permacrud>
10638         </class>
10639
10640         <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">
10641                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10642                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10643                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10644                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10645                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10646                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10647                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10648                 </fields>
10649                 <links>
10650                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10651                 </links>
10652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10653                         <actions>
10654                                 <retrieve/>
10655                         </actions>
10656                 </permacrud>
10657         </class>
10658
10659         <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">
10660                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10661                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10662                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10663                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10664                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10665                 </fields>
10666                 <links>
10667                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10668                 </links>
10669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10670                         <actions>
10671                                 <retrieve/>
10672                         </actions>
10673                 </permacrud>
10674         </class>
10675
10676     <class
10677         id="uvs"
10678         controller="open-ils.cstore open-ils.pcrud"
10679         oils_obj:fieldmapper="url_verify::session"
10680         oils_persist:tablename="url_verify.session"
10681         reporter:label="URL Verification Session"
10682     >
10683         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10684             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10685             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10686                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10687             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10688             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10689             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10690             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10691             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10692             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10693         </fields>
10694
10695         <links>
10696             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10697             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10698             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10699             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10700             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10701         </links>
10702
10703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10704             <actions>
10705                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10706             </actions>
10707         </permacrud>
10708
10709     </class>
10710
10711     <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">
10712         <oils_persist:source_definition>
10713             SELECT
10714                 cbrebi.id AS id,  -- so we can have a pkey in our view
10715                 uvs.id AS session,
10716                 uvs.owning_lib,
10717                 cbrebi.target_biblio_record_entry
10718             FROM url_verify.session uvs
10719             JOIN container.biblio_record_entry_bucket cbreb
10720                 ON (uvs.container = cbreb.id)
10721             JOIN container.biblio_record_entry_bucket_item cbrebi
10722                 ON (cbrebi.bucket = cbreb.id)
10723         </oils_persist:source_definition>
10724         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10725             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10726             <field reporter:label="Session" name="session" reporter:datatype="link" />
10727             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10728             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10729         </fields>
10730         <links>
10731             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10732             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10733             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10734         </links>
10735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10736             <actions>
10737                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10738             </actions>
10739         </permacrud>
10740     </class>
10741
10742     <class
10743         id="uvus"
10744         controller="open-ils.cstore open-ils.pcrud"
10745         oils_obj:fieldmapper="url_verify::url_selector"
10746         oils_persist:tablename="url_verify.url_selector"
10747         reporter:label="URL Verification URL Selector"
10748     >
10749         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10750             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10751             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10752                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10753             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10754         </fields>
10755
10756         <links>
10757             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10758             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10759         </links>
10760
10761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10762             <actions>
10763                 <create permission="URL_VERIFY">
10764                     <context link="session" field="owning_lib"/>
10765                 </create>
10766                 <retrieve permission="URL_VERIFY">
10767                     <context link="session" field="owning_lib"/>
10768                 </retrieve>
10769                 <update permission="URL_VERIFY">
10770                     <context link="session" field="owning_lib"/>
10771                 </update>
10772                 <delete permission="URL_VERIFY">
10773                     <context link="session" field="owning_lib"/>
10774                 </delete>
10775             </actions>
10776         </permacrud>
10777
10778     </class>
10779
10780     <class
10781         id="uvu"
10782         controller="open-ils.cstore open-ils.pcrud"
10783         oils_obj:fieldmapper="url_verify::url"
10784         oils_persist:tablename="url_verify.url"
10785         reporter:label="URL Verification URL"
10786     >
10787         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10788             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10789                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10790                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10791                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10792                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10793             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10794             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10795             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10796             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10797             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10798             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10799             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10800             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10801             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10802             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10803             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10804             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10805             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10806         </fields>
10807
10808         <links>
10809             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10810             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10811             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10812             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10813             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10814         </links>
10815
10816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10817             <actions>
10818                 <create permission="URL_VERIFY">
10819                     <context link="session" field="owning_lib"/>
10820                 </create>
10821                 <retrieve permission="URL_VERIFY">
10822                     <context link="session" field="owning_lib"/>
10823                 </retrieve>
10824                 <update permission="URL_VERIFY">
10825                     <context link="session" field="owning_lib"/>
10826                 </update>
10827                 <delete permission="URL_VERIFY">
10828                     <context link="session" field="owning_lib"/>
10829                 </delete>
10830             </actions>
10831         </permacrud>
10832
10833     </class>
10834
10835     <class
10836         id="uvva"
10837         controller="open-ils.cstore open-ils.pcrud"
10838         oils_obj:fieldmapper="url_verify::verification_attempt"
10839         oils_persist:tablename="url_verify.verification_attempt"
10840         reporter:label="URL Verification Attempt"
10841     >
10842         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10843             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10844                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10845                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10846             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10847             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10848         </fields>
10849
10850         <links>
10851             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10852             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10853         </links>
10854
10855         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10856             <actions>
10857                 <create permission="URL_VERIFY">
10858                     <context link="session" field="owning_lib"/>
10859                 </create>
10860                 <retrieve permission="URL_VERIFY">
10861                     <context link="session" field="owning_lib"/>
10862                 </retrieve>
10863                 <update permission="URL_VERIFY">
10864                     <context link="session" field="owning_lib"/>
10865                 </update>
10866                 <delete permission="URL_VERIFY">
10867                     <context link="session" field="owning_lib"/>
10868                 </delete>
10869             </actions>
10870         </permacrud>
10871
10872     </class>
10873
10874     <class
10875         id="uvuv"
10876         controller="open-ils.cstore open-ils.pcrud"
10877         oils_obj:fieldmapper="url_verify::url_verification"
10878         oils_persist:tablename="url_verify.url_verification"
10879         reporter:label="URL Verification"
10880     >
10881         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10882             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10883                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10884                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10885             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10886             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10887             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10888             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10889                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10890         </fields>
10891
10892         <links>
10893             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10894             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10895             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10896         </links>
10897
10898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10899             <actions>
10900                 <create permission="URL_VERIFY">
10901                     <context link="attempt" jump="session" field="owning_lib"/>
10902                 </create>
10903                 <retrieve permission="URL_VERIFY">
10904                     <context link="attempt" jump="session" field="owning_lib"/>
10905                 </retrieve>
10906                 <update permission="URL_VERIFY">
10907                     <context link="attempt" jump="session" field="owning_lib"/>
10908                 </update>
10909                 <delete permission="URL_VERIFY">
10910                     <context link="attempt" jump="session" field="owning_lib"/>
10911                 </delete>
10912             </actions>
10913         </permacrud>
10914
10915     </class>
10916
10917         <class
10918                 id="cfdi"
10919                 controller="open-ils.cstore open-ils.pcrud"
10920                 oils_obj:fieldmapper="config::filter_dialog_interface"
10921                 oils_persist:tablename="config.filter_dialog_interface"
10922                 reporter:label="FilterDialog Interface">
10923                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10924                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10925                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10926                 </fields>
10927                 <links>
10928                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10929                 </links>
10930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10931                         <actions>
10932                                 <retrieve />
10933                         </actions>
10934                 </permacrud>
10935         </class>
10936
10937         <class
10938                 id="cfdfs"
10939                 controller="open-ils.cstore open-ils.pcrud"
10940                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10941                 oils_persist:tablename="config.filter_dialog_filter_set"
10942                 reporter:label="FilterDialog Filter Set">
10943                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10944                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10945                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10946                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10947                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10948                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10949                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10950                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10951                 </fields>
10952                 <links>
10953                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10954                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10955                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10956                 </links>
10957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10958                         <actions>
10959                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10960                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10961                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10962                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10963                         </actions>
10964                 </permacrud>
10965
10966         </class>
10967
10968         <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">
10969                 <fields oils_persist:primary="code">
10970                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10971                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10972                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10973                 </fields>
10974                 <links/>
10975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10976                         <actions>
10977                                 <retrieve/>
10978                         </actions>
10979                 </permacrud>
10980         </class>
10981
10982         <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">
10983                 <oils_persist:source_definition>
10984
10985             SELECT  b.id,
10986                     MAX(dcp.edit_date) AS last_delete_date
10987              FROM   biblio.record_entry b
10988                     JOIN asset.call_number cn ON (cn.record = b.id)
10989                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10990              WHERE  NOT b.deleted
10991              GROUP BY b.id
10992              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10993
10994                 </oils_persist:source_definition>
10995                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10996                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10997                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10998                 </fields>
10999                 <links>
11000                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11001                 </links>
11002                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11003                         <actions>
11004                                 <retrieve/>
11005                         </actions>
11006                 </permacrud>
11007         </class>
11008
11009         <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">
11010                 <oils_persist:source_definition>
11011
11012             -- -- 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.
11013             -- -- 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
11014             -- -- may not.
11015             -- SELECT
11016             --     bre.id AS bib_id,
11017             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11018             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11019             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11020             -- FROM (
11021                 SELECT
11022                     y.bre AS id,
11023                     COALESCE( x.copy_count, 0 ) AS copy_count,
11024                     y.hold_count AS hold_count,
11025                     (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
11026                 FROM (
11027                         SELECT
11028                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11029                             COUNT(*) AS hold_count
11030                         FROM action.hold_request h
11031                         WHERE
11032                             cancel_time IS NULL
11033                             AND fulfillment_time IS NULL
11034                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11035                         GROUP BY 1
11036                     )y LEFT JOIN (
11037                         SELECT 
11038                             (SELECT id
11039                                 FROM biblio.record_entry 
11040                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11041                             ) AS bre, 
11042                             COUNT(*) AS copy_count
11043                         FROM asset.copy
11044                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11045                         WHERE copy.holdable 
11046                             AND NOT copy.deleted 
11047                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11048                         GROUP BY 1
11049                     )x ON x.bre = y.bre
11050                 -- )z RIGHT JOIN (
11051                 --     SELECT id
11052                 --     FROM biblio.record_entry
11053                 --     WHERE NOT deleted
11054                 -- )bre ON (z.bib_id = bre.id)
11055                 
11056
11057                 </oils_persist:source_definition>
11058                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11059                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11060                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11061                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11062                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11063                 </fields>
11064                 <links>
11065                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11066                 </links>
11067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11068                         <actions>
11069                                 <retrieve/>
11070                         </actions>
11071                 </permacrud>
11072         </class>
11073
11074         <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">
11075                 <oils_persist:source_definition>
11076             SELECT *,
11077                 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,
11078                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11079             FROM
11080                 (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
11081                     FROM
11082                         action.hold_request ahr
11083                         JOIN reporter.hold_request_record rhrr USING (id)
11084                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11085                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11086                     WHERE
11087                         ahr.cancel_time IS NULL
11088                         AND ahr.fulfillment_time IS NULL
11089                     GROUP BY bib_record, pickup_lib
11090                 )x
11091                 JOIN
11092                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11093                     FROM
11094                         action.hold_request ahr
11095                         JOIN reporter.hold_request_record rhrr USING (id)
11096                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11097                     WHERE
11098                         ahr.cancel_time IS NULL
11099                         AND ahr.fulfillment_time IS NULL
11100                     GROUP BY bib_record
11101                 )y
11102                 USING (id)
11103                 </oils_persist:source_definition>
11104                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11105                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11106                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11107                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11108                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11109                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11110                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11111                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11112                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11113                 </fields>
11114                 <links>
11115                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11116                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11117                 </links>
11118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11119                         <actions>
11120                                 <retrieve/>
11121                         </actions>
11122                 </permacrud>
11123         </class>
11124
11125         <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) ">
11126                 <oils_persist:source_definition>
11127             WITH counts_at_ou AS (
11128                 SELECT  rhrr.bib_record AS id,
11129                         aou.id AS pickup_lib_or_desc,
11130                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11131                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11132                   FROM  actor.org_unit aou
11133                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11134                         action.hold_request ahr
11135                         JOIN reporter.hold_request_record rhrr USING (id)
11136                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11137                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11138                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11139                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11140                         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
11141                   GROUP BY 1, 2
11142             )
11143             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11144                    y.holds_everywhere, y.copy_count_everywhere,
11145                 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,
11146                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11147             FROM counts_at_ou x
11148                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11149                     FROM
11150                         action.hold_request ahr
11151                         JOIN reporter.hold_request_record rhrr USING (id)
11152                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11153                     WHERE
11154                         ahr.cancel_time IS NULL
11155                         AND ahr.fulfillment_time IS NULL
11156                     GROUP BY bib_record
11157                 )y
11158                 USING (id)
11159                 </oils_persist:source_definition>
11160                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11161                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11162                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11163                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11164                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11165                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11166                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11167                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11168                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11169                 </fields>
11170                 <links>
11171                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11172                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11173                 </links>
11174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11175                         <actions>
11176                                 <retrieve/>
11177                         </actions>
11178                 </permacrud>
11179         </class>
11180
11181         <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">
11182                 <oils_persist:source_definition>
11183             SELECT
11184                 ac.id,
11185                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11186                 MAX(actac.xact_start) AS last_circ
11187             FROM asset.copy ac
11188                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11189             GROUP BY ac.id
11190
11191             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11192             --SELECT
11193             --    ac.id,
11194             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11195             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11196             --FROM asset.copy ac
11197             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11198             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11199             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11200                 </oils_persist:source_definition>
11201                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11202                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11203                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11204                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11205                 </fields>
11206                 <links>
11207                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11208                 </links>
11209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11210                         <actions>
11211                                 <retrieve/>
11212                         </actions>
11213                 </permacrud>
11214         </class>
11215
11216         <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">
11217                 <fields oils_persist:primary="id">
11218                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11219                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11220                 </fields>
11221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11222                         <actions>
11223                                 <retrieve/>
11224                         </actions>
11225                 </permacrud>
11226         </class>
11227
11228         <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">
11229                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11230                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11231                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11232                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11233                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11234                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11235                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11236                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11237                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11238                 </fields>
11239                 <links>
11240                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11241                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11242                 </links>
11243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11244                         <actions>
11245                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11246                                 <retrieve/>
11247                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11248                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11249                         </actions>
11250                 </permacrud>
11251         </class>
11252
11253         <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">
11254                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11255                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11256                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11257                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11258                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11259                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11260                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11261                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11262                 </fields>
11263                 <links>
11264                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11265                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11266                 </links>
11267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11268                         <actions>
11269                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11270                                 <retrieve/>
11271                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11272                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11273                         </actions>
11274                 </permacrud>
11275         </class>
11276
11277
11278         <!-- ********************************************************************************************************************* -->
11279         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11280         <!-- ********************************************************************************************************************* -->
11281         <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">
11282                 <fields oils_persist:primary="id">
11283                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11284                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11285                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11286                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11287                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11288                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11289                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11290                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11291                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11292                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11293                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11294                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11295                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11296                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11297                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11298                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11299                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11300                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11301                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11302                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11303                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11304                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11305                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11306                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11307                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11308                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11309                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11310                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11311                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11312                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11313                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11314                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11315                 </fields>
11316                 <links>
11317                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11318                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11319                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11320                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11321                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11322                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11323                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11324                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11325                 </links>
11326         </class>
11327
11328         <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">
11329                 <fields oils_persist:primary="id">
11330                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11331                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11332                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11333                 </fields>
11334                 <links>
11335                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11336                 </links>
11337         </class>
11338
11339         <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">
11340                 <fields oils_persist:primary="id">
11341                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11342                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11343                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11344                 </fields>
11345                 <links>
11346                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11347                 </links>
11348         </class>
11349
11350         <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">
11351                 <fields oils_persist:primary="id">
11352                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11353
11354                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11355                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11356                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11357
11358                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11359                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11360                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11361
11362                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11363                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11364
11365                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11366                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11367                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11368
11369                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11370                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11371
11372                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11373                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11374                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11375
11376                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11377                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11378                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11379
11380                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11381                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11382                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11383                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11384
11385                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11386                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11387
11388                 </fields>
11389                 <links>
11390                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11391                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11392                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11393                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11394                 </links>
11395         </class>
11396
11397         <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">
11398                 <oils_persist:source_definition>
11399
11400             SELECT
11401                 po.ordering_agency AS ordering_agency,
11402                 po.id AS purchase_order,
11403                 li.id AS lineitem,
11404                 lid.id AS lineitem_detail,
11405                 cpa.id AS claim_policy_action
11406             FROM
11407                 acq.lineitem_detail lid
11408                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11409                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11410                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11411                 JOIN acq.claim_policy_action cpa ON (
11412                     cpa.claim_policy = cp.id
11413
11414                     -- we only care about claim policy actions whose claim
11415                     -- interval we'd reached or exceeded
11416                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11417
11418                     -- filter out all claim policy actions where claim events
11419                     -- have occurred on or after the action's action_interval
11420                     AND NOT EXISTS (
11421                         SELECT 1
11422                         FROM
11423                             acq.claim_event evt
11424                             JOIN acq.claim claim ON (
11425                                 claim.id = evt.claim
11426                                 AND claim.lineitem_detail = lid.id
11427                             )
11428                         WHERE
11429                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11430                     )
11431                 )
11432             WHERE
11433                 lid.cancel_reason IS NULL
11434                 AND li.cancel_reason IS NULL -- belt/suspenders
11435                 AND po.cancel_reason IS NULL -- belt/suspenders
11436                 AND lid.recv_time IS NULL
11437                 AND po.state = 'on-order'
11438             ORDER BY 1, 2, 3, 4, 5
11439
11440                 </oils_persist:source_definition>
11441                 <fields>
11442                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11443                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11444                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11445                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11446                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11447                 </fields>
11448                 <links>
11449                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11450                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11451                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11452                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11453                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11454                 </links>
11455         </class>
11456         <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">
11457                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11458                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11459                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11460                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11461                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11462                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11463                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11464                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11465                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11466                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11467                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11468                 </fields>
11469                 <links>
11470                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11471                 </links>
11472     </class>
11473         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11474                 <oils_persist:source_definition>
11475             SELECT * FROM acq.lineitem_summary 
11476                                 WHERE item_count > (invoice_count + cancel_count)
11477         </oils_persist:source_definition>
11478                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11479                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11480                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11481                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11482                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11483                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11484                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11485                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11486                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11487                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11488                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11489                 </fields>
11490                 <links>
11491                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11492                 </links>
11493     </class>
11494         <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">
11495                 <oils_persist:source_definition>
11496
11497                         SELECT  t.*
11498                           FROM  action.transit_copy t
11499                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11500                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11501                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11502
11503                 </oils_persist:source_definition>
11504                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11505                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11506                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11507                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11508                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11509                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11510                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11511                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11512                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11513                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11514                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11515                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11516                 </fields>
11517                 <links>
11518                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11519                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11520                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11521                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11522                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11523                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11524                 </links>
11525         </class>
11526
11527     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11528                 <oils_persist:source_definition>
11529
11530         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11531                 SELECT
11532                         cp.id as copy,
11533                         COUNT(circ.id),
11534                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11535                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11536                 FROM
11537                         asset.copy cp
11538                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11539                 GROUP BY 1, 3, 4
11540                 UNION ALL
11541                 SELECT
11542                         cp.id as copy,
11543                         COUNT(circ.id),
11544                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11545                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11546                 FROM
11547                         asset.copy cp
11548                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11549                 GROUP BY 1, 3, 4
11550                 UNION ALL
11551                 SELECT
11552                         id as copy,
11553                         circ_count,
11554                         -1 AS year,
11555                         false as is_renewal
11556                 FROM
11557                         extend_reporter.legacy_circ_count
11558         )x GROUP BY 1, 3, 4
11559
11560                 </oils_persist:source_definition>
11561         <fields>
11562             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11563             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11564             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11565             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11566         </fields>
11567                 <links>
11568                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11569                 </links>
11570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11571                         <actions>
11572                                 <retrieve/>
11573                         </actions>
11574                 </permacrud>
11575     </class>
11576
11577         <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">
11578                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11579                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11580                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11581                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11582                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11583                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11584                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11585                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11586                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11587                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11588                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11589                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11590                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11591                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11592                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11593                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11594                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11595                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11596                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11597                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11598                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11599                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11600                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11601                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11602                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11603                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11604                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11605                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11606                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11607                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11608                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11609                 </fields>
11610                 <links>
11611                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11612                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11613                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11614                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11615                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11616                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11617                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11618                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11619                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11620                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11621                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11622                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11623                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11624                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11625                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11626                 </links>
11627         </class>
11628
11629     <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">
11630         <fields oils_persist:primary="id">
11631             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11632             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11633             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11634             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11635             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11636             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11637             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11638             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11639             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11640             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11641             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11642             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11643             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11644             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11645             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11646             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11647             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11648             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11649             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11650             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11651             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11652             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11653             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11654             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11655             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11656             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11657             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11658             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11659             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11660             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11661             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11662             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11663             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11664             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11665         </fields>
11666         <links>
11667             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11668             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11669             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11670             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11671             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11672             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11673             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11674             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11675         </links>
11676     </class>
11677
11678     <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">
11679         <fields oils_persist:primary="id">
11680             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11681             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11682             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11683             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11684         </fields>
11685         <links>
11686             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11687             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11688         </links>
11689     </class>
11690
11691     <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">
11692         <fields oils_persist:primary="owning_lib">
11693             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11694             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11695             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11696         </fields>
11697         <links>
11698             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11699         </links>
11700     </class>
11701
11702     <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">
11703         <fields oils_persist:primary="id">
11704             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11705             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11706             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11707             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11708             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11709         </fields>
11710         <links>
11711             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11712             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11713             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11714         </links>
11715     </class>
11716
11717     <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">
11718         <fields oils_persist:primary="circ_lib">
11719             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11720             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11721             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11722             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11723         </fields>
11724         <links>
11725             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11726             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11727         </links>
11728     </class>
11729
11730     <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">
11731         <fields oils_persist:primary="id">
11732             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11733             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11734             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11735             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11736             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11737         </fields>
11738         <links>
11739             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11740             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11741             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11742         </links>
11743     </class>
11744
11745     <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">
11746         <fields oils_persist:primary="home_ou">
11747             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11748             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11749             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11750             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11751         </fields>
11752         <links>
11753             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11754             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11755         </links>
11756     </class>
11757         <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">
11758                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11759                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11760                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11761                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11762                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11763                 </fields>
11764                 <links>
11765                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11766                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11767                 </links>
11768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11769                         <actions>
11770                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11771                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11772                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11773                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11774                         </actions>
11775                 </permacrud>
11776         </class>
11777         <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">
11778                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11779                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11780                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11781                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11782                 </fields>
11783                 <links>
11784                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11785                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11786                         </links>
11787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11788                 <actions>
11789                                 <create permission="ADMIN_ACQ_FUND_TAG">
11790                                         <context link="tag" field="owner"/>
11791                                 </create>
11792                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11793                                         <context link="tag" field="owner"/>
11794                                 </retrieve>
11795                                 <update permission="ADMIN_ACQ_FUND_TAG">
11796                                         <context link="tag" field="owner"/>
11797                                 </update>
11798                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11799                                         <context link="tag" field="owner"/>
11800                                 </delete>
11801                         </actions>
11802                 </permacrud>
11803         </class>
11804         <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">
11805                 <oils_persist:source_definition><![CDATA[
11806                 SELECT
11807                         poi.purchase_order AS purchase_order,
11808                         ii.invoice AS invoice,
11809                         NULL AS lineitem,
11810                         poi.id AS po_item,
11811                         NULL AS picklist
11812                 FROM
11813                         acq.po_item poi
11814                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11815                 UNION SELECT
11816                         jub.purchase_order AS purchase_order,
11817                         ie.invoice AS invoice,
11818                         jub.id AS lineitem,
11819                         NULL AS po_item,
11820                         jub.picklist AS picklist
11821                 FROM
11822                         acq.lineitem jub
11823                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11824                 UNION SELECT
11825                         ii.purchase_order AS purchase_order,
11826                         ii.invoice AS invoice,
11827                         NULL AS lineitem,
11828                         NULL AS po_item,
11829                         NULL AS picklist
11830                 FROM
11831                         acq.invoice_item ii
11832                 WHERE ii.po_item IS NULL
11833                 UNION SELECT
11834                         ie.purchase_order AS purchase_order,
11835                         ie.invoice AS invoice,
11836                         NULL AS lineitem,
11837                         NULL AS po_item,
11838                         NULL AS picklist
11839                 FROM
11840                         acq.invoice_entry ie
11841                 WHERE ie.lineitem IS NULL
11842                 UNION SELECT
11843                         NULL AS purchase_order,
11844                         NULL AS invoice,
11845                         jub.id AS lineitem,
11846                         NULL AS po_item,
11847                         jub.picklist AS picklist
11848                 FROM
11849                         acq.lineitem jub
11850                 WHERE jub.purchase_order IS NULL
11851                 ]]></oils_persist:source_definition>
11852                 <fields>
11853                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11854                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11855                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11856                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11857                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11858                 </fields>
11859                 <links>
11860                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11861                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11862                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11863                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11864                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11865                 </links>
11866         </class>
11867         <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">
11868                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11869                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11870                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11871                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11872                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11873                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11874                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11875                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11876                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11877                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11878                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11879                 </fields>
11880                 <links>
11881                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11882                 </links>
11883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11884                         <actions>
11885                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11886                                 <retrieve/>
11887                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11888                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11889                         </actions>
11890                 </permacrud>
11891         </class>
11892
11893         <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">
11894                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11896                         <field name="date_applied" reporter:datatype="timestamp"/>
11897                         <field name="org" reporter:datatype="org_unit"/>
11898                         <field name="original_value" reporter:datatype="text"/>
11899                         <field name="new_value" reporter:datatype="text"/>
11900                         <field name="field_name" reporter:datatype="link"/>
11901                 </fields>
11902                 <links>
11903                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11904                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11905                 </links>
11906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11907                         <actions>
11908                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11909                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11910                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11911                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11912                         </actions>
11913                 </permacrud>
11914         </class>
11915         <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">
11916                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11917                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11918                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11919                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11920                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11921                 </fields>
11922                 <links>
11923                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11924                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11925                 </links>
11926         </class>
11927         <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">
11928                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11929                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11930                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11931                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11932                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11933                 </fields>
11934                 <links>
11935                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11936                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11937                 </links>
11938         </class>
11939         <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">
11940                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11941                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
11942                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11943                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11944                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11945                 </fields>
11946                 <links>
11947                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11948                 </links>
11949                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11950                         <actions>
11951                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11952                                 <retrieve/>
11953                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11954                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11955                         </actions>
11956                 </permacrud>
11957         </class>
11958         <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">
11959                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11960                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11961                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11962                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11963                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11964                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11965                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11966                 </fields>
11967                 <links>
11968                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11969                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11970                 </links>
11971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11972                         <actions>
11973                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11974                                 <retrieve/>
11975                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11976                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11977                         </actions>
11978                 </permacrud>
11979         </class>
11980         <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">
11981                 <fields oils_persist:primary="code">
11982                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
11983                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
11984                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
11985                 </fields>
11986                 <links>
11987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11988                 </links>
11989                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11990                         <actions>
11991                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11992                                 <retrieve/>
11993                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11994                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11995                         </actions>
11996                 </permacrud>
11997         </class>
11998         <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">
11999                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12000                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12001                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12002                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12003                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12004                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12005                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12006                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12007                 </fields>
12008                 <links>
12009                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12010                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12011                 </links>
12012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12013                         <actions>
12014                                 <create permission="ADMIN_COPY_TAGS" context_field="owner"/>
12015                                 <retrieve/>
12016                                 <update permission="ADMIN_COPY_TAGS" context_field="owner"/>
12017                                 <delete permission="ADMIN_COPY_TAGS" context_field="owner"/>
12018                         </actions>
12019                 </permacrud>
12020         </class>
12021         <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">
12022                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12023                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12024                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12025                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12026                 </fields>
12027                 <links>
12028                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12029                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12030                 </links>
12031                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12032                         <actions>
12033                                 <create permission="UPDATE_COPY">
12034                     <context link="copy" field="circ_lib"/>
12035                 </create>
12036                                 <retrieve/>
12037                                 <update permission="UPDATE_COPY">
12038                     <context link="copy" field="circ_lib"/>
12039                 </update>
12040                                 <delete permission="UPDATE_COPY">
12041                     <context link="copy" field="circ_lib"/>
12042                 </delete>
12043                         </actions>
12044                 </permacrud>
12045         </class>
12046         <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">
12047         <oils_persist:source_definition>
12048         SELECT ahcm.target_copy AS id,count(*) AS count
12049          FROM
12050          action.hold_request ahr,
12051          action.hold_copy_map ahcm
12052          WHERE
12053          ahr.cancel_time IS NULL AND
12054          ahr.fulfillment_time IS NULL AND
12055          ahr.capture_time IS NULL AND
12056          ahr.id = ahcm.hold
12057          GROUP BY ahcm.target_copy
12058         </oils_persist:source_definition>
12059         <fields oils_persist:primary="id">
12060             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12061             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12062         </fields>
12063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12064             <actions>
12065                <retrieve/>
12066             </actions>
12067         </permacrud>
12068         </class>
12069
12070         <!-- ********************************************************************************************************************* -->
12071
12072 </IDL>
12073
12074 <!--
12075     vim:noet:ts=4:sw=4:
12076 -->