]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1855780: updates to IDL
[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                         <field name="debit_card_payment" oils_persist:virtual="true" />
98                 </fields>
99                 <links>
100                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
101                 </links>
102         </class>
103
104         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
105                 <fields>
106                         <field name="id" oils_persist:virtual="true" />
107                         <field name="children" oils_persist:virtual="true" />
108                         <field name="owner_doc" oils_persist:virtual="true" />
109                         <field name="intra_doc_id" oils_persist:virtual="true" />
110                         <field name="parent_node" oils_persist:virtual="true" />
111                         <field name="node_type" oils_persist:virtual="true" />
112                         <field name="namespace_uri" oils_persist:virtual="true" />
113                         <field name="name" oils_persist:virtual="true" />
114                         <field name="value" oils_persist:virtual="true" />
115                 </fields>
116         </class>
117
118         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
119                 <fields>
120                         <field name="title" oils_persist:virtual="true" />
121                         <field name="author" oils_persist:virtual="true" />
122                         <field name="doc_id" oils_persist:virtual="true" />
123                         <field name="doc_type" oils_persist:virtual="true" />
124                         <field name="pubdate" oils_persist:virtual="true" />
125                         <field name="isbn" oils_persist:virtual="true" />
126                         <field name="publisher" oils_persist:virtual="true" />
127                         <field name="tcn" oils_persist:virtual="true" />
128                         <field name="subject" oils_persist:virtual="true" />
129                         <field name="types_of_resource" oils_persist:virtual="true" />
130                         <field name="call_numbers" oils_persist:virtual="true" />
131                         <field name="edition" oils_persist:virtual="true" />
132                         <field name="online_loc" oils_persist:virtual="true" />
133                         <field name="synopsis" oils_persist:virtual="true" />
134                         <field name="physical_description" oils_persist:virtual="true" />
135                         <field name="toc" oils_persist:virtual="true" />
136                         <field name="copy_count" oils_persist:virtual="true" />
137                         <field name="series" oils_persist:virtual="true" />
138                         <field name="serials" oils_persist:virtual="true" />
139                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
140                 </fields>
141         </class>
142
143         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
144                 <fields>
145                         <field name="err_msg" oils_persist:virtual="true" />
146                         <field name="type" oils_persist:virtual="true" />
147                 </fields>
148         </class>
149
150         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
151                 <fields>
152                         <field name="err_msg" oils_persist:virtual="true" />
153                         <field name="type" oils_persist:virtual="true" />
154                 </fields>
155         </class>
156
157         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
158                 <fields oils_persist:primary="matchpoint">
159                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
160                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
161                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
162                 </fields>
163                 <links>
164                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
165                 </links>
166         </class>
167
168         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
169         <!-- when the time is right, turn me into a view.  -->
170                 <fields>
171             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
172             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
174             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
176             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
177             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
179             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
180             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
181                 </fields>
182         </class>
183
184         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
185                 <fields>
186                         <field name="public_name" oils_persist:virtual="true" />
187                         <field name="target_url" oils_persist:virtual="true" />
188                         <field name="target_coverage" oils_persist:virtual="true" />
189                         <field name="target_embargo" oils_persist:virtual="true" />
190                 </fields>
191         </class>
192
193         <!-- Actually in the DB -->
194         <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">
195                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
196                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
197                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
198                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
199                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
200                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
201                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
202                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
203                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
204                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
205                         <field reporter:label="Update Bib. Edit Date" name="update_bib_editor" reporter:datatype="bool"/>
206                 </fields>
207                 <links>
208                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
209                 </links>
210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
211                         <actions>
212                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
213                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
214                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
215                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
216                         </actions>
217                 </permacrud>
218         </class>
219
220         <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">
221                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
222                         <field reporter:label="Field ID" name="id" reporter:datatype="id" reporter:selector="field"/>
223                         <field reporter:label="Group" name="grp" reporter:datatype="link" config_field="true"/>
224                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
225                 </fields>
226                 <links>
227                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
228                 </links>
229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
230                         <actions>
231                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
232                     <context link="grp" field="owner"/>
233                 </create>
234                                 <retrieve/>
235                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
236                     <context link="grp" field="owner"/>
237                 </update>
238                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
239                     <context link="grp" field="owner"/>
240                 </delete>
241                         </actions>
242                 </permacrud>
243         </class>
244
245         <class  id="rrbs" 
246             controller="open-ils.cstore open-ils.pcrud" 
247             oils_obj:fieldmapper="rating::record_badge_score" 
248             oils_persist:tablename="rating.record_badge_score" 
249             reporter:label="Statistical Popularity Badge">
250                 <fields oils_persist:primary="id" 
251                 oils_persist:sequence="rating.record_badge_score_id_seq">
252                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
253                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
254                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
255                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
256                 </fields>
257         <links>
258             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
259             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
260         </links>
261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
262                         <actions>
263                                 <retrieve/>
264                         </actions>
265                 </permacrud>
266         </class>
267
268         <class  id="rp" 
269             controller="open-ils.cstore open-ils.pcrud" 
270             oils_obj:fieldmapper="rating::popularity_parameter" 
271             oils_persist:tablename="rating.popularity_parameter" 
272             reporter:label="Statistical Popularity Parameter">
273                 <fields oils_persist:primary="id" 
274                 oils_persist:sequence="rating.popularity_parameter_id_seq">
275                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
276                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
277                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
278                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
279                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
280                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
281                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
282                 </fields>
283                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
284                         <actions>
285                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
286                                 <retrieve/>
287                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
288                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
289                         </actions>
290                 </permacrud>
291         </class>
292
293         <class  id="rb" 
294             controller="open-ils.cstore open-ils.pcrud" 
295             oils_obj:fieldmapper="rating::badge" 
296             oils_persist:tablename="rating.badge" 
297             reporter:label="Statistical Popularity Badge">
298                 <fields oils_persist:primary="id" 
299                 oils_persist:sequence="rating.badge_id_seq">
300                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
301                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
302                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
303                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
304                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
305                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
306                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
307                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
308                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
309                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
310                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
311                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
312                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
313                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
314                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
315                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
316                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
317                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
318                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
319                 </fields>
320                 <links>
321                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
322                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
323                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
324                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
325                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
326                 </links>
327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
328                         <actions>
329                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
330                                 <retrieve/>
331                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
332                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
333                         </actions>
334                 </permacrud>
335         </class>
336
337         <class  id="vibtg" 
338             controller="open-ils.cstore open-ils.pcrud" 
339             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
340             oils_persist:tablename="vandelay.import_bib_trash_group" 
341             reporter:label="Import/Overlay Field Groups for Removal">
342                 <fields oils_persist:primary="id" 
343                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
344                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
345                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
346                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
347                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
348                         <field reporter:label="Fields" name="import_bib_trash_fields" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
349                 </fields>
350                 <links>
351                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
352                         <link field="import_bib_trash_fields" reltype="has_many" key="grp" map="" class="vibtf"/>
353                 </links>
354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
355                         <actions>
356                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
357                                 <retrieve/>
358                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
359                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
360                         </actions>
361                 </permacrud>
362         </class>
363
364
365         <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">
366                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
367                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
368                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
369                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
370                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
371                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
372                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
373                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
374                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
375                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
376                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
377                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
378                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
379                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
380                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
381                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
382                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
383                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
384                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
385                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
386                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
387                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
388                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
389                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
390                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
391                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
392                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
393                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
394                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
395                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
396                 </fields>
397                 <links>
398                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
399                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
400                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
401                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
402                 </links>
403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
404                         <actions>
405                                 <create permission="CREATE_IMPORT_ITEM">
406                     <context link="definition" field="owner"/>
407                                 </create>
408                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
409                     <context link="definition" field="owner"/>
410                                 </retrieve>
411                                 <update permission="UPDATE_IMPORT_ITEM">
412                     <context link="definition" field="owner"/>
413                                 </update>
414                                 <delete permission="DELETE_IMPORT_ITEM">
415                     <context link="definition" field="owner"/>
416                                 </delete>
417                         </actions>
418                 </permacrud>
419         </class>
420
421         <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">
422                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
423                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
424                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
425                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
426                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
427                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
428                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
429                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
430                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
431                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
432                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
433                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
434                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
435                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
436                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
437                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
438                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
439                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
440                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
441                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
442                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
443                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
444                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
445                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
446                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
447                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
448                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
449                 </fields>
450                 <links>
451                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
452                 </links>
453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
454                         <actions>
455                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
456                                 <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"/>
457                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
458                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
459                         </actions>
460                 </permacrud>
461         </class>
462
463         <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">
464                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
465                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
466                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
467                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
468                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
469                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
470                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
471                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
472                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
473                 </fields>
474                 <links>
475                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
476                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
477                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
478                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
479                 </links>
480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
481                         <actions>
482                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
484                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
485                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
486                         </actions>
487                 </permacrud>
488         </class>
489
490         <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">
491                 <fields oils_persist:primary="code">
492                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
493                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
494                 </fields>
495                 <links>
496                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
497                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
498                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
499                 </links>
500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
501                         <actions>
502                                 <retrieve/>
503                         </actions>
504                 </permacrud>
505         </class>
506
507         <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">
508                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
509                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
510                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
511                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
512                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
513                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
514                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
515                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
516                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
517                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
518                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
519                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
520                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
521                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
522                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
523                 </fields>
524                 <links>
525                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
526                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
527                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
528                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
529             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
530             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
531             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
532                 </links>
533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
534                         <actions>
535                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
536                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
537                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
538                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
539                         </actions>
540                 </permacrud>
541         </class>
542
543         <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">
544                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
545                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
546                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
547                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
548                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
549                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
550                 </fields>
551                 <links/>
552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
553                         <actions>
554                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
555                 <retrieve/>
556                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
557                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
558                         </actions>
559                 </permacrud>
560         </class>
561
562         <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">
563                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
564                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
565                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
566                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
567                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
568                 </fields>
569                 <links>
570                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
571                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
572                 </links>
573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
574                         <actions>
575                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
576                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
577                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
578                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
579                         </actions>
580                 </permacrud>
581         </class>
582
583         <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">
584                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
585                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
586                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
587                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
588                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
589                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
590                 </fields>
591                 <links>
592                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
593                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
594                 </links>
595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
596                         <actions>
597                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
598                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
599                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
600                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
601                         </actions>
602                 </permacrud>
603         </class>
604
605         <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">
606                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
607                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
608                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
609                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
610                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
611                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
612                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
613                 </fields>
614                 <links>
615                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
616                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
617                 </links>
618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
619                         <actions>
620                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
623                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
624                         </actions>
625                 </permacrud>
626         </class>
627
628         <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">
629                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
630                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
631                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
632                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
633                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
634                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
635                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
636                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
637                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
638                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
639                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
640                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
641                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
642                 </fields>
643                 <links>
644                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
645                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
646                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
647             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
648             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
649                 </links>
650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
651                         <actions>
652                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
654                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
655                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
656                         </actions>
657                 </permacrud>
658         </class>
659
660         <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">
661                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
662                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
663                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
664                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
665                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
666                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
667                 </fields>
668                 <links/>
669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
670                         <actions>
671                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
672                 <retrieve/>
673                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
674                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
675                         </actions>
676                 </permacrud>
677         </class>
678
679         <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">
680                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
681                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
682                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
683                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
684                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
685                 </fields>
686                 <links>
687                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
688                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
689                 </links>
690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
691                         <actions>
692                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
694                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
695                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
696                         </actions>
697                 </permacrud>
698         </class>
699
700         <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">
701                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
702                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
703                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
704                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
705                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
706                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
707                 </fields>
708                 <links>
709                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
710                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
711                 </links>
712                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
713                         <actions>
714                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
716                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
717                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
718                         </actions>
719                 </permacrud>
720         </class>
721
722         <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">
723                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
724                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
725                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
726                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
727                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
728                 </fields>
729                 <links>
730                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
731                 </links>
732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
733                         <actions>
734                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
735                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
736                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
737                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
738                         </actions>
739                 </permacrud>
740         </class>
741
742         <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">
743                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
744                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
745                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
746                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
747                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
748                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
749                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
750                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
751             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
752                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
753                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
754                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
755                 </fields>
756                 <links>
757                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
758                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
759                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
760                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
761                 </links>
762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
763                         <actions>
764                                 <create permission="ADMIN_IMPORT_MATCH_SET">
765                     <context link="match_set" field="owner"/>
766                                 </create>
767                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
768                     <context link="match_set" field="owner"/>
769                                 </retrieve>
770                                 <update permission="ADMIN_IMPORT_MATCH_SET">
771                     <context link="match_set" field="owner"/>
772                                 </update>
773                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
774                     <context link="match_set" field="owner"/>
775                                 </delete>
776                         </actions>
777                 </permacrud>
778         </class>
779
780         <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">
781                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
782                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
783                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
784                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
785                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
786                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
787                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
788                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
789                 </fields>
790                 <links>
791                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
792                 </links>
793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
794                         <actions>
795                                 <create permission="ADMIN_IMPORT_MATCH_SET">
796                     <context link="match_set" field="owner"/>
797                                 </create>
798                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
799                     <context link="match_set" field="owner"/>
800                                 </retrieve>
801                                 <update permission="ADMIN_IMPORT_MATCH_SET">
802                     <context link="match_set" field="owner"/>
803                                 </update>
804                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
805                     <context link="match_set" field="owner"/>
806                                 </delete>
807                         </actions>
808                 </permacrud>
809         </class>
810
811         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
812                 oils_obj:fieldmapper="vandelay::session_tracker" 
813                 oils_persist:tablename="vandelay.session_tracker" 
814                 reporter:label="Vandelay Session Tracker">
815                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
817                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
818                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
819                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
820                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
821                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
822                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
823                                          queue or an auth queue and there's no IDL class for vandelay.queue .
824                                          parent table.
825                         -->
826                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
827                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
828                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
829                         <field reporter:label="State" name="state" reporter:datatype="text"/>
830                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
831                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
832                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
833                 </fields>
834                 <links>
835                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
836                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
837                 </links>
838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
839                         <actions>
840                                 <!-- created by the API -->
841                                 <retrieve global_required="true"
842                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
843                                 <update global_required="true"
844                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
845                                         <context link="workstation" field="owning_lib"/>
846                                 </update>
847                                 <delete 
848                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
849                                         <context link="workstation" field="owning_lib"/>
850                                 </delete>
851                         </actions>
852                 </permacrud>
853         </class>
854
855         <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">
856                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
857                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
858                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
859                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
860                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
861                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
862                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
863                 </fields>
864                 <links>
865                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
866                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
867                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
868                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
869                 </links>
870         </class>
871
872     <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">
873         <fields oils_persist:primary="name">
874             <field reporter:label="Name" name="name" reporter:datatype="text"/>
875             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
876             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
877             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
878         </fields>
879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
880             <actions>
881                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
883                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
884                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
885             </actions>
886         </permacrud>
887     </class>
888
889     <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">
890         <fields oils_persist:primary="id">
891             <field reporter:label="ID" name="id" reporter:datatype="id"/>
892             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
893             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
894             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
895             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
896         </fields>
897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
898             <actions>
899                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
900                 <retrieve/>
901                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
902                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
903             </actions>
904         </permacrud>
905     </class>
906
907         <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">
908                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
909                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
910                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
911                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
912                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
913                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
914                 </fields>
915                 <links>
916                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
917                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
918                 </links>
919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
920             <actions>
921                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
922                 <retrieve/>
923                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
924                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
925             </actions>
926         </permacrud>
927         </class>
928
929         <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">
930                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
931                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
932                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
933                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
934         </fields>
935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
936             <actions>
937                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
938                 <retrieve/>
939                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
940                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
941             </actions>
942         </permacrud>
943         </class>
944
945         <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">
946                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
947                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
948                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
949                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
950                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
951                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
952                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
953                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
954                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
955                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
956                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
957                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
958         </fields>
959                 <links>
960                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
961                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
962         </links>
963         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
964             <actions>
965                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
966                 <retrieve/>
967                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
968                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
969             </actions>
970         </permacrud>
971         </class>
972
973         <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">
974                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
975                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
976                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
977                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
978                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
979                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
980                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
981                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
982                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
983                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
984                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
985         </fields>
986                 <links>
987                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
988                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
989         </links>
990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
991             <actions>
992                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
993                 <retrieve/>
994                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
995                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
996             </actions>
997         </permacrud>
998         </class>
999
1000         <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">
1001                 <fields oils_persist:primary="name">
1002                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1003                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1004                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1005                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1006                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1007                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1008                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1009                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1010                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1011                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1012                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1013                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1014                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1015                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1016                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1017                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1018                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1019                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1020                 </fields>
1021                 <links>
1022                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1023                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1024                 </links>
1025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1026             <actions>
1027                 <create permission="ADMIN_SVF" global_required="true"/>
1028                 <retrieve/>
1029                 <update permission="ADMIN_SVF" global_required="true"/>
1030                 <delete permission="ADMIN_SVF" global_required="true"/>
1031             </actions>
1032         </permacrud>
1033         </class>
1034
1035         <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">
1036                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1037                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1038                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1039                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1040             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1041                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1042                 </fields>
1043                 <links/>
1044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1045             <actions>
1046                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1047                 <retrieve/>
1048                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1049                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1050             </actions>
1051         </permacrud>
1052         </class>
1053
1054         <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">
1055                 <fields oils_persist:primary="coded_value">
1056                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1057                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1058                 </fields>
1059                 <links>
1060                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1061                 </links>
1062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1063             <actions>
1064                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1065                 <retrieve/>
1066                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1067                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1068             </actions>
1069         </permacrud>
1070         </class>
1071
1072         <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">
1073                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1074                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1075                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1076                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1077                 </fields>
1078                 <links>
1079                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1080                 </links>
1081         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1082             <actions>
1083                 <retrieve/>
1084             </actions>
1085         </permacrud>
1086         </class>
1087
1088
1089         <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">
1090                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1091                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1092                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1093                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1094                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1098                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1099                 </links>
1100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1101             <actions>
1102                 <retrieve/>
1103             </actions>
1104         </permacrud>
1105         </class>
1106
1107
1108         <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">
1109                 <fields oils_persist:primary="source">
1110                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1111                         <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 -->
1112                 </fields>
1113                 <links>
1114                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1115                 </links>
1116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1117             <actions>
1118                 <retrieve/>
1119             </actions>
1120         </permacrud>
1121         </class>
1122
1123         <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">
1124                 <fields>
1125                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1126                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1127                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1128                 </fields>
1129                 <links>
1130                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1131                 </links>
1132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1133             <actions>
1134                 <retrieve/>
1135             </actions>
1136         </permacrud>
1137         </class>
1138
1139         <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">
1140                 <fields oils_persist:primary="id">
1141                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1142                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1143                 </fields>
1144                 <links>
1145                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1146                 </links>
1147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1148             <actions>
1149                 <retrieve/>
1150             </actions>
1151         </permacrud>
1152         </class>
1153
1154         <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">
1155                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1156                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1157                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1158                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1159                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1160                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1161                 </fields>
1162                 <links>
1163                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1164                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1165                 </links>
1166         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1167             <actions>
1168                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1169                 <retrieve/>
1170                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1171                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1172             </actions>
1173         </permacrud>
1174         </class>
1175
1176         <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">
1177                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1178                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1179                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1180                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1181                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1182                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1183                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1184                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1185             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1186             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1187             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1188                 </fields>
1189                 <links>
1190                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1191                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1192                 </links>
1193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1194             <actions>
1195                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1196                 <retrieve/>
1197                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1198                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1199             </actions>
1200         </permacrud>
1201         </class>
1202
1203         <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">
1204                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1205                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1206                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1207                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1208                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1209                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1210                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1211                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1212                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1213                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1214                 </fields>
1215                 <links>
1216                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1217                 </links>
1218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1219             <actions>
1220                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1222                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1223                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1224             </actions>
1225         </permacrud>
1226         </class>
1227
1228     <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">
1229         <fields oils_persist:primary="name">
1230             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1231             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1232             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1233             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1234             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1235             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1236             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1237             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1238             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link" config_field="true"/>
1239             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1240         </fields>
1241         <links>
1242             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1243             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1244         </links>
1245         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1246             <actions>
1247                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1248                 <retrieve/>
1249                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1251             </actions>
1252         </permacrud>
1253     </class>
1254
1255     <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">
1256         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1257             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1258             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link" config_field="true"/>
1259             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1260             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1261             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1262             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1263             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1264         </fields>
1265         <links>
1266             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1267         </links>
1268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1269             <actions>
1270                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1271                 <retrieve/>
1272                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1273                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1274             </actions>
1275         </permacrud>
1276     </class>
1277
1278     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1279                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1280                         oils_persist:tablename="config.z3950_index_field_map" 
1281                         reporter:label="Z39.50 Index Field Map">
1282         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1283             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1284             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1285             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1286             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1287             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1288             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1289         </fields>
1290         <links>
1291             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1292             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1293             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1294         </links>
1295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1296             <actions>
1297                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1298                 <retrieve/>
1299                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1300                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1301             </actions>
1302         </permacrud>
1303     </class>
1304
1305
1306         <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">
1307                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1308                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1309                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1310                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1311                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1312                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1313                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1314                 </fields>
1315                 <links>
1316             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1317             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1318                 </links>
1319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1320                         <actions>
1321                                 <retrieve/>
1322                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1323                         </actions>
1324                 </permacrud>
1325         </class>
1326
1327         <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">
1328                 <fields oils_persist:primary="key">
1329                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1330                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text" oils_obj:required="true"/>
1331                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1332                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1333                 </fields>
1334                 <links/>
1335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1336                         <actions>
1337                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1338                                 <retrieve/>
1339                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1340                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1341                         </actions>
1342                 </permacrud>
1343         </class>
1344
1345         <class id="atcol" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1346                 <fields oils_persist:primary="module">
1347                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module" oils_obj:required="true"/>
1348                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1349                 </fields>
1350                 <links/>
1351                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1352                         <actions>
1353                                 <retrieve/>
1354                         </actions>
1355                 </permacrud>
1356         </class>
1357
1358         <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">
1359                 <fields oils_persist:primary="module">
1360                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module" oils_obj:required="true"/>
1361                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1362                 </fields>
1363                 <links/>
1364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1365                         <actions>
1366                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1367                                 <retrieve/>
1368                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1369                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1370                         </actions>
1371                 </permacrud>
1372         </class>
1373
1374         <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">
1375                 <fields oils_persist:primary="module">
1376                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module" oils_obj:required="true"/>
1377                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1378                 </fields>
1379                 <links/>
1380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1381                         <actions>
1382                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1383                                 <retrieve/>
1384                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1385                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1386                         </actions>
1387                 </permacrud>
1388         </class>
1389
1390         <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">
1391                 <fields oils_persist:primary="module">
1392                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1393                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1394                 </fields>
1395                 <links/>
1396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1397                         <actions>
1398                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1399                                 <retrieve/>
1400                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1401                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1402                         </actions>
1403                 </permacrud>
1404         </class>
1405
1406         <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">
1407                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1408                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1409                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1410                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1411                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1412                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1413                 </fields>
1414                 <links>
1415                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1416                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1417                 </links>
1418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1419                         <actions>
1420                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </create>
1423                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1424                     <context link="event_def" field="owner"/>
1425                 </retrieve>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1427                     <context link="event_def" field="owner"/>
1428                 </update>
1429                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1430                     <context link="event_def" field="owner"/>
1431                 </delete>
1432                         </actions>
1433                 </permacrud>
1434         </class>
1435
1436         <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">
1437                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1438                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1439                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1440                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit" oils_obj:required="true"/>
1441                         <field reporter:label="Hook" name="hook"  reporter:datatype="link" oils_obj:required="true"/>
1442                         <field reporter:label="Validator" name="validator"  reporter:datatype="link" oils_obj:required="true"/>
1443                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link" oils_obj:required="true"/>
1444                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1445                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1446                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1447                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1448                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1449                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1450                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1451                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_obj:required="true"/>
1452                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1453                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1454                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1455                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1456                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1457                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1458                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1459                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1460                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1461                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1462                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1463                         <field reporter:label="Context User Path" name="context_usr_path" reporter:datatype="text"/>
1464                         <field reporter:label="Context Library Path" name="context_library_path" reporter:datatype="text"/>
1465                         <field reporter:label="Context Bib Path" name="context_bib_path" reporter:datatype="text"/>
1466                         <field reporter:label="Context Item Path" name="context_item_path" reporter:datatype="text"/>
1467                 </fields>
1468                 <links>
1469                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1470                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1471                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1472                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1473                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1474                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1475                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1476                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1477                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1478                 </links>
1479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1480                         <actions>
1481                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1482                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1483                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1484                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1485                         </actions>
1486                 </permacrud>
1487         </class>
1488
1489         <class id="atevdefg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_def_group" oils_persist:tablename="action_trigger.event_def_group" reporter:label="Trigger Event Definition Group" oils_persist:restrict_primary="100">
1490                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_id_seq">
1491                         <field reporter:label="Group ID" name="id" reporter:datatype="id"/>
1492                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1493                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1494                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1495                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1496                         <field reporter:label="Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
1497                 </fields>
1498                 <links>
1499                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1500                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1501                         <link field="members" reltype="has_many" key="grp" map="" class="atevdefgm"/>
1502                 </links>
1503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504                         <actions>
1505                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1506                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1507                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1508                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1509                         </actions>
1510                 </permacrud>
1511         </class>
1512
1513         <class id="atevdefgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_def_group_member" oils_persist:tablename="action_trigger.event_def_group_member" reporter:label="Trigger Event Definition Group Member">
1514                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_member_id_seq">
1515                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1516                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1517                         <field reporter:label="Group" name="grp"  reporter:datatype="link"/>
1518                         <field reporter:label="Event Definition" name="event_def"  reporter:datatype="link"/>
1519                         <field reporter:label="Sortable" name="sortable" reporter:datatype="bool"/>
1520                         <field reporter:label="Include Holdings" name="holdings" reporter:datatype="bool"/>
1521                         <field reporter:label="Externally Processed" name="external" reporter:datatype="bool"/>
1522                 </fields>
1523                 <links>
1524                         <link field="grp" reltype="has_a" key="id" map="" class="atevdefg"/>
1525                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1526                 </links>
1527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1528                         <actions>
1529                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1530                     <context link="grp" field="owner"/>
1531                 </create>
1532                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1533                     <context link="grp" field="owner"/>
1534                 </retrieve>
1535                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1536                     <context link="grp" field="owner"/>
1537                 </update>
1538                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1539                     <context link="grp" field="owner"/>
1540                 </delete>
1541                         </actions>
1542                 </permacrud>
1543         </class>
1544
1545         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1546                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1547                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1548                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1549                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1550                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1551                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1552                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1553                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1554                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1555                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1556                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1557                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1558                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1559                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1560                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1561                         <field reporter:label="Context User" name="context_user" reporter:datatype="link"/>
1562                         <field reporter:label="Context Library" name="context_library" reporter:datatype="link"/>
1563                         <field reporter:label="Context Bib" name="context_bib" reporter:datatype="link"/>
1564                         <field reporter:label="Context Item" name="context_item" reporter:datatype="link"/>
1565                 </fields>
1566                 <links>
1567                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1568                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1569                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1570                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1571                         <link field="context_user" reltype="has_a" key="id" map="" class="au"/>
1572                         <link field="context_library" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="context_bib" reltype="has_a" key="id" map="" class="bre"/>
1574                         <link field="context_item" reltype="has_a" key="id" map="" class="acp"/>
1575                 </links>
1576         </class>
1577
1578         <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">
1579                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1580                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1581                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link" oils_obj:required="true"/>
1582                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text" oils_obj:required="true"/>
1583                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text" oils_obj:required="true"/>
1584                 </fields>
1585                 <links>
1586                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1587                 </links>
1588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1589                         <actions>
1590                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1591                     <context link="event_def" field="owner"/>
1592                 </create>
1593                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1594                     <context link="event_def" field="owner"/>
1595                 </retrieve>
1596                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1597                     <context link="event_def" field="owner"/>
1598                 </update>
1599                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1600                     <context link="event_def" field="owner"/>
1601                 </delete>
1602                         </actions>
1603                 </permacrud>
1604         </class>
1605
1606         <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">
1607                 <oils_persist:source_definition><![CDATA[
1608                 SELECT  atevdef.hook,
1609                         atevdef.name,
1610                         atevdef.reactor,
1611                         atev.id,
1612                         atev.event_def,
1613                         atev.add_time,
1614                         atev.run_time,
1615                         atev.start_time,
1616                         atev.update_time,
1617                         atev.complete_time,
1618                         atev.update_process,
1619                         atev.state,
1620                         atev.user_data,
1621                         atev.template_output,
1622                         atev.error_output,
1623                         atev.async_output,
1624                         targ_circ.id AS target_circ,
1625                         targ_ahr.id AS target_hold,
1626                         COALESCE(
1627                                 targ_circ.circ_lib,
1628                                 targ_ahr.pickup_lib
1629                         ) AS perm_lib
1630                 FROM action_trigger.event atev
1631                 JOIN action_trigger.event_definition atevdef ON
1632                         (atevdef.id = atev.event_def)
1633                 JOIN action_trigger.hook ath ON
1634                         (ath.key = atevdef.hook)
1635                 LEFT JOIN action.circulation targ_circ ON
1636                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1637                 LEFT JOIN action.hold_request targ_ahr ON
1638                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1639                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1640                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1641                                 'circ.staff.max_visible_event_age',
1642                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1643                         ) UNION
1644                         SELECT '1000 YEARS'::INTERVAL AS value
1645                 ) ous)
1646                 ]]></oils_persist:source_definition>
1647                 <fields oils_persist:primary="id">
1648                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1649                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1650                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1651                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1652                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1653                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1654                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1655                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1656                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1657                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1658                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1659                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1660                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1661                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1662                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1663                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1664                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1665                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1666                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1667                 </fields>
1668                 <links>
1669                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1670                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1671                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1672                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1673                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1674                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1675                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1676                 </links>
1677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1678                         <actions>
1679                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1680                         </actions>
1681                 </permacrud>
1682         </class>
1683
1684         <class id="atoul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::optimized_user_log" reporter:label="Action Trigger Optimized User Log" oils_persist:readonly="true">
1685                 <oils_persist:source_definition><![CDATA[
1686                 SELECT  atevdef.hook,
1687                         atevdef.name,
1688                         atevdef.reactor,
1689                         atev.id,
1690                         atev.event_def,
1691                         atev.add_time,
1692                         atev.run_time,
1693                         atev.start_time,
1694                         atev.update_time,
1695                         atev.complete_time,
1696                         atev.update_process,
1697                         atev.state,
1698                         atev.user_data,
1699                         atev.template_output,
1700                         atev.error_output,
1701                         atev.async_output,
1702             atev.target,
1703                         CASE WHEN ath.core_type = 'circ' THEN atev.target END AS target_circ,
1704                         CASE WHEN ath.core_type = 'ahr' THEN atev.target END AS target_hold,
1705             atev.context_user,
1706                         atev.context_library,
1707             atev.context_bib,
1708             atev.context_item,
1709             rssr.title,
1710             rssr.author
1711                 FROM action_trigger.event atev
1712                 JOIN action_trigger.event_definition atevdef ON
1713                         (atevdef.id = atev.event_def)
1714                 JOIN action_trigger.hook ath ON
1715                         (ath.key = atevdef.hook AND ath.core_type IN ('circ','ahr'))
1716         LEFT JOIN reporter.super_simple_record rssr ON
1717             (atev.context_bib = rssr.id)
1718                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1719                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1720                                 'circ.staff.max_visible_event_age',
1721                                 atev.context_library
1722                         ) UNION
1723                         SELECT '1000 YEARS'::INTERVAL AS value
1724                 ) ous)
1725                 ]]></oils_persist:source_definition>
1726                 <fields oils_persist:primary="id">
1727                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1728                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1729                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1730                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1731                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1732                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1733                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1734                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1735                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1736                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1737                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1738                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1739                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1740                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1741                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1742                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1743                         <field reporter:label="Event Target Object ID" name="target" reporter:datatype="link" />
1744                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1745                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1746                         <field reporter:label="Context User" name="context_user" reporter:datatype="link" />
1747                         <field reporter:label="Context Library" name="context_library" reporter:datatype="org_unit" />
1748                         <field reporter:label="Context Bib" name="context_bib" reporter:datatype="link" />
1749                         <field reporter:label="Context Item" name="context_item" reporter:datatype="link" />
1750                         <field reporter:label="Title" name="title" reporter:datatype="text" />
1751                         <field reporter:label="Author" name="author" reporter:datatype="text" />
1752                 </fields>
1753                 <links>
1754                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1755                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1756                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1757                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1758                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1759                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1760                         <link field="context_user" reltype="has_a" key="id" map="" class="au" />
1761                         <link field="context_library" reltype="has_a" key="id" map="" class="aou" />
1762                         <link field="context_bib" reltype="has_a" key="id" map="" class="bre" />
1763                         <link field="context_item" reltype="has_a" key="id" map="" class="acp" />
1764                 </links>
1765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1766                         <actions>
1767                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="context_library" />
1768                         </actions>
1769                 </permacrud>
1770         </class>
1771
1772         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1773                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1774                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1775                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1776                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1777                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1778                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1779                 </fields>
1780                 <links>
1781                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1782                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1783                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1784                 </links>
1785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1786                         <actions>
1787                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1788                         </actions>
1789                 </permacrud>
1790         </class>
1791
1792         <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">
1793                 <fields oils_persist:primary="code">
1794                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1795                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1796                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1797                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1798                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1799                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1800                 </fields>
1801                 <links/>
1802         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1803             <actions>
1804                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1805                 <retrieve/>
1806                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1807                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1808             </actions>
1809         </permacrud>
1810         </class>
1811
1812         <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">
1813                 <fields oils_persist:primary="code">
1814                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1815                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1816                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1817                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1818                 </fields>
1819                 <links/>
1820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1821             <actions>
1822                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1823                 <retrieve/>
1824                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1825                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1826             </actions>
1827         </permacrud>
1828         </class>
1829
1830         <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">
1831                 <fields oils_persist:primary="code">
1832                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1833                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1834                 </fields>
1835                 <links/>
1836         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1837             <actions>
1838                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1839                 <retrieve/>
1840                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1841                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1842             </actions>
1843         </permacrud>
1844         </class>
1845
1846         <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">
1847                 <fields oils_persist:primary="code">
1848                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1849                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1850                 </fields>
1851                 <links/>
1852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1853             <actions>
1854                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1855                 <retrieve/>
1856                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1857                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1858             </actions>
1859         </permacrud>
1860         </class>
1861
1862         <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">
1863                 <fields oils_persist:primary="code">
1864                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1865                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1866                 </fields>
1867                 <links/>
1868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1869             <actions>
1870                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1871                 <retrieve/>
1872                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1873                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1874             </actions>
1875         </permacrud>
1876         </class>
1877
1878         <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">
1879                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1880                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1881                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1882                 </fields>
1883                 <links/>
1884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1885             <actions>
1886                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1887                 <retrieve/>
1888                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1889                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1890             </actions>
1891         </permacrud>
1892         </class>
1893
1894         <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">
1895                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1896                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1897                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1898                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1899                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1900                 </fields>
1901         <links>
1902             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1903             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1904             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1905         </links>
1906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1907             <actions>
1908                 <create permission="UPDATE_COPY">
1909                     <context link="target_copy" field="circ_lib"/>
1910                 </create>
1911                 <retrieve/>
1912                 <update permission="UPDATE_COPY">
1913                     <context link="target_copy" field="circ_lib"/>
1914                 </update>
1915                 <delete permission="UPDATE_COPY">
1916                     <context link="target_copy" field="circ_lib"/>
1917                 </delete>
1918             </actions>
1919         </permacrud>
1920         </class>
1921
1922         <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">
1923                 <fields oils_persist:primary="code">
1924                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1925                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1926                 </fields>
1927                 <links/>
1928         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1929             <actions>
1930                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1931                 <retrieve/>
1932                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1933                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1934             </actions>
1935         </permacrud>
1936         </class>
1937
1938         <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">
1939                 <fields oils_persist:primary="code">
1940                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1941                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1942                 </fields>
1943                 <links/>
1944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1945             <actions>
1946                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1947                 <retrieve/>
1948                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1949                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1950             </actions>
1951         </permacrud>
1952         </class>
1953
1954         <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">
1955                 <fields oils_persist:primary="code">
1956                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1957                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1958                 </fields>
1959                 <links/>
1960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1961             <actions>
1962                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1963                 <retrieve/>
1964                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1965                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1966             </actions>
1967         </permacrud>
1968         </class>
1969
1970     <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">
1971         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1972             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1973             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1974             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1975             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1976             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1977             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1978             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1979             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1980             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1981             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1982             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1983             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1984             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1985             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1986             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1987             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1988             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1989         </fields>
1990         <links/>
1991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1992             <actions>
1993                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1994                 <retrieve/>
1995                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1996                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1997             </actions>
1998         </permacrud>
1999     </class>
2000
2001     <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">
2002         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
2003             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2004             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2005             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
2006             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
2007             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
2008             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
2009             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
2010             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
2011             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
2012             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
2013             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
2014             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
2015             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
2016             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
2017             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
2018             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
2019             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
2020             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
2021             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
2022         </fields>
2023         <links/>
2024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2025             <actions>
2026                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2027                 <retrieve/>
2028                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2029                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2030             </actions>
2031         </permacrud>
2032     </class>
2033
2034     <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">
2035         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
2036             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
2037             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2038             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
2039             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
2040             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
2041         </fields>
2042         <links>
2043             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2044             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
2045             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
2046         </links>
2047         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2048             <actions>
2049                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2050                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2051                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2052                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
2053             </actions>
2054         </permacrud>
2055     </class>
2056
2057         <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">
2058                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
2059                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
2060                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2061                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
2062                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
2063                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
2064                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
2065                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
2066                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
2067                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
2068                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
2069                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
2070                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
2071                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
2072                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
2073                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
2074                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
2075             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
2076                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
2077                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
2078                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
2079                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
2080                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
2081                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
2082                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
2083                 </fields>
2084                 <links>
2085                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
2086                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
2087                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
2088                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
2089                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
2090                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
2091                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
2092                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
2093                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
2094                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
2095                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2096                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
2097                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
2098             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
2099                 </links>
2100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2101             <actions>
2102                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2103                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2104                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2105                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2106             </actions>
2107         </permacrud>
2108         </class>
2109
2110         <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">
2111                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
2112                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
2113                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
2114                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2115                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
2116                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
2117                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
2118                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
2119                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
2120                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
2121                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
2122                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
2123                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
2124                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
2125                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
2126                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
2127             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
2128                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
2129                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
2130             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
2131                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
2132                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
2133                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2134                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2135             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2136             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
2137             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
2138                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
2139                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
2140                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
2141                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
2142                 </fields>
2143                 <links>
2144                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2145                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2146                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2147                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
2148                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2149                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
2150                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2151                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
2152                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
2153                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2154                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
2155                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
2156                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
2157                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
2158             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2159                 </links>
2160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2161             <actions>
2162                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2163                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2164                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2165                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2166             </actions>
2167         </permacrud>
2168         </class>
2169
2170     <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">
2171         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2172             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2173             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2174             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2175         </fields>
2176         <links/>
2177         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2178             <actions>
2179                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2180                 <retrieve/>
2181                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2182                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2183             </actions>
2184         </permacrud>
2185     </class>
2186
2187     <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">
2188         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2189             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2190             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2191             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2192             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2193             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2194             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2195             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2196         </fields>
2197         <links>
2198             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2199         </links>
2200         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2201             <actions>
2202                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2203                 <retrieve/>
2204                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2205                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2206             </actions>
2207         </permacrud>
2208     </class>
2209
2210     <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">
2211         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2212             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2213             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2214             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2215             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2216             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2217         </fields>
2218         <links>
2219             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2220             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2221         </links>
2222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2223             <actions>
2224                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2225                     <context link="matchpoint" field="org_unit"/>
2226                 </create>
2227                 <retrieve/>
2228                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2229                     <context link="matchpoint" field="org_unit"/>
2230                 </update>
2231                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2232                     <context link="matchpoint" field="org_unit"/>
2233                 </delete>
2234             </actions>
2235         </permacrud>
2236     </class>
2237
2238     <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">
2239         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2240             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2241             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2242             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2243         </fields>
2244         <links>
2245             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2246             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2247         </links>
2248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2249             <actions>
2250                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2251                     <context link="limit_set" field="owning_lib"/>
2252                 </create>
2253                 <retrieve/>
2254                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2255                     <context link="limit_set" field="owning_lib"/>
2256                 </update>
2257                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2258                     <context link="limit_set" field="owning_lib"/>
2259                 </delete>
2260             </actions>
2261         </permacrud>
2262     </class>
2263     <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">
2264         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2265             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2266             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2267             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2268         </fields>
2269         <links>
2270             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2271             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2272         </links>
2273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2274             <actions>
2275                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2276                     <context link="limit_set" field="owning_lib"/>
2277                 </create>
2278                 <retrieve/>
2279                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2280                     <context link="limit_set" field="owning_lib"/>
2281                 </update>
2282                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2283                     <context link="limit_set" field="owning_lib"/>
2284                 </delete>
2285             </actions>
2286         </permacrud>
2287     </class>
2288
2289     <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">
2290         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2291             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2292             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2293             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2294             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2295         </fields>
2296         <links>
2297             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2298             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2299         </links>
2300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2301             <actions>
2302                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2303                     <context link="limit_set" field="owning_lib"/>
2304                 </create>
2305                 <retrieve/>
2306                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2307                     <context link="limit_set" field="owning_lib"/>
2308                 </update>
2309                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2310                     <context link="limit_set" field="owning_lib"/>
2311                 </delete>
2312             </actions>
2313         </permacrud>
2314     </class>
2315
2316         <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">
2317                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2318                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2319                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2320                 </fields>
2321                 <links/>
2322         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2323             <actions>
2324                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2325                 <retrieve/>
2326                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2327                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2328             </actions>
2329         </permacrud>
2330         </class>
2331
2332         <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">
2333                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2334                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2335                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2336                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2338                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2339                 </fields>
2340                 <links>
2341                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2342                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2343                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2344                 </links>
2345         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2346             <actions>
2347                 <create permission="ADMIN_SURVEY">
2348                     <context link="survey" field="owner"/>
2349                 </create>
2350                 <retrieve/>
2351                 <update permission="ADMIN_SURVEY">
2352                     <context link="survey" field="owner"/>
2353                 </update>
2354                 <delete permission="ADMIN_SURVEY">
2355                     <context link="survey" field="owner"/>
2356                 </delete>
2357             </actions>
2358         </permacrud>
2359         </class>
2360         <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">
2361                 <fields oils_persist:primary="id" oils_persist:sequence="">
2362                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2363                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2364                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2365                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2367                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2368                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2369                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2370                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2371                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2372                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2373                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2374                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2375                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2376                 </fields>
2377                 <links>
2378                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2379                 </links>
2380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2381                         <actions>
2382                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2383                                         <context link="usr" field="home_ou" />
2384                                 </retrieve>
2385                         </actions>
2386                 </permacrud>
2387         </class>
2388         <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">
2389                 <fields oils_persist:primary="id" oils_persist:sequence="">
2390                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2391                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2392                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2393                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2394                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2395                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2396                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2397                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2398                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2399                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2400                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2401                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2402                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2403                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2404                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2405                 </fields>
2406                 <links>
2407                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2408                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2409                 </links>
2410         </class>
2411         <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">
2412                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2413                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2414                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2415                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2416                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2417                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2418                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2419                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2420                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2421                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2422                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2423                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
2424                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2425                 </fields>
2426                 <links>
2427                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2428                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2429                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2430                 </links>
2431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2432                         <actions> <!-- created magically, so no create action -->
2433                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2434                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2435                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2436                         </actions>
2437                 </permacrud>
2438         </class>
2439         <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)">
2440                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2441                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2442                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2443                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2444                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2445                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2446                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2447                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2448                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2449                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2450                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2451                         <field reporter:label="Editor" name="usr" reporter:datatype="link" />
2452                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2453                 </fields>
2454                 <links>
2455                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2456                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2457                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2458                 </links>
2459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2460                         <actions> <!-- created magically, so no create action -->
2461                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2462                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2463                         </actions>
2464                 </permacrud>
2465         </class>
2466         <class id="aump" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_penalty" oils_persist:tablename="actor.usr_message_penalty" reporter:label="User Message Penalty">
2467         <fields oils_persist:primary="id">
2468                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2469                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2470                         <field reporter:label="Debug: Set Date (Penalty)" name="ausp_set_date" reporter:datatype="timestamp"/>
2471                         <field reporter:label="Debug: Creation Date/Time (Message)" name="aum_create_date" reporter:datatype="timestamp"/>
2472                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2473                         <field reporter:label="Creating Library" name="org_unit" reporter:datatype="link"/>
2474                         <field reporter:label="Debug: Creating Library (Penalty)" name="ausp_org_unit" reporter:datatype="link"/>
2475                         <field reporter:label="Debug: Creating Library (Message)" name="aum_sending_lib" reporter:datatype="link"/>
2476                         <field reporter:label="Debug: Penalty ID" name="ausp_id" reporter:datatype="id" />
2477                         <field reporter:label="Debug: Message ID" name="aum_id" reporter:datatype="id" />
2478                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2479                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2480                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2481                         <field reporter:label="Debug: User (Penalty)" name="ausp_usr" reporter:datatype="link" />
2482                         <field reporter:label="Debug: User (Message)" name="aum_usr" reporter:datatype="link" />
2483                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2484                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2485                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2486                         <field reporter:label="Debug: Stop Date/Time (Penalty)" name="ausp_stop_date" reporter:datatype="timestamp"/>
2487                         <field reporter:label="Debug: Stop Date/Time (Message)" name="aum_stop_date" reporter:datatype="timestamp"/>
2488                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
2489                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2490                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2491                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2492                         <field name="ausp_usr_message" reporter:datatype="link" reporter:label="Debug: User Message (Penalty)"/>
2493                 </fields>
2494                 <links>
2495                         <link field="ausp_id" reltype="has_a" key="id" map="" class="ausp"/>
2496                         <link field="aum_id" reltype="has_a" key="id" map="" class="aum"/>
2497                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2498                         <link field="ausp_usr" reltype="has_a" key="id" map="" class="au"/>
2499                         <link field="aum_usr" reltype="has_a" key="id" map="" class="au"/>
2500                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2501                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2502                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2503                         <link field="aum_sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2504                         <link field="ausp_org_unit" reltype="has_a" key="id" map="" class="aou"/>
2505                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2506                         <link field="ausp_usr_message" reltype="has_a" key="id" map="" class="aum"/>
2507                 </links>
2508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2509                         <actions> <!-- created magically, so no create action -->
2510                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2511                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2512                         </actions>
2513                 </permacrud>
2514         </class>
2515
2516         <class id="aupw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_privacy_waiver" oils_persist:tablename="actor.usr_privacy_waiver" reporter:label="Privacy Waiver">
2517                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2518                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2519                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2520                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2521                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2522                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2523                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2524                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2525                 </fields>
2526                 <links>
2527                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2528                 </links>
2529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2530                         <actions>
2531                                 <create permission="UPDATE_USER">
2532                                         <context link="usr" field="home_ou"/>
2533                                 </create>
2534                                 <retrieve permission="VIEW_USER">
2535                                         <context link="usr" field="home_ou"/>
2536                                 </retrieve>
2537                                 <update permission="UPDATE_USER">
2538                                         <context link="usr" field="home_ou"/>
2539                                 </update>
2540                                 <delete permission="UPDATE_USER">
2541                                         <context link="usr" field="home_ou"/>
2542                                 </delete>
2543                         </actions>
2544                 </permacrud>
2545         </class>
2546         <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">
2547                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2548                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2549                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2550                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2551                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2552                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2553                 </fields>
2554                 <links>
2555                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2556                 </links>
2557         </class>
2558         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2559                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2560                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2561                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2562                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2563                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2564                 </fields>
2565                 <links>
2566                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2567                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2568                 </links>
2569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2570                         <actions>
2571                                 <retrieve permission="VIEW_USER">
2572                                         <context link="usr" field="home_ou" />
2573                                 </retrieve>
2574                         </actions>
2575                 </permacrud>
2576         </class>
2577         <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">
2578                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2579                         <field name="field" reporter:datatype="link"/>
2580                         <field name="id" reporter:datatype="id" />
2581                         <field name="source" reporter:datatype="link"/>
2582                         <field name="value" reporter:datatype="text"/>
2583                 </fields>
2584                 <links>
2585                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2586                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2587                 </links>
2588         </class>
2589         <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">
2590                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2591                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2592                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2593                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2594                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2595                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2596                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2597                 </fields>
2598                 <links>
2599                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2600                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2601                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2602                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2603                 </links>
2604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2605                         <actions>
2606                                 <retrieve/>
2607                         </actions>
2608                 </permacrud>
2609         </class>
2610         <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">
2611                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2612                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2613                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2614                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2615                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2616                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2617                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2618                 </fields>
2619                 <links>
2620                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2621                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2622                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2623                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2624                 </links>
2625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2626                         <actions>
2627                                 <retrieve/>
2628                         </actions>
2629                 </permacrud>
2630         </class>
2631         <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">
2632                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2633                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2634                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2635                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2636                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2637                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2638                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2639                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2640                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2641                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2642                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2643                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2644                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2645                 </fields>
2646                 <links>
2647                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2648                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2649                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2650                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2651                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2652                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2653                 </links>
2654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2655             <actions>
2656                 <create permission="TRANSIT_COPY" context_field="owner">
2657                     <context link="target_copy" field="circ_lib"/>
2658                 </create>
2659                 <retrieve/>
2660                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2661                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2662             </actions>
2663         </permacrud>
2664         </class>
2665         <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">
2666                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2667                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2668                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2669                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2670                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2671                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2672                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2673                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2674                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2675                 </fields>
2676                 <links>
2677                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2678                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2679                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2680                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2681                 </links>
2682         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2683             <actions>
2684                 <create permission="ADMIN_SURVEY">
2685                     <context link="survey" field="owner"/>
2686                 </create>
2687                 <retrieve permission="VIEW_USER">
2688                     <context link="usr" field="home_ou"/>
2689                 </retrieve>
2690                 <update permission="ADMIN_SURVEY">
2691                     <context link="survey" field="owner"/>
2692                 </update>
2693                 <delete permission="ADMIN_SURVEY">
2694                     <context link="survey" field="owner"/>
2695                 </delete>
2696             </actions>
2697         </permacrud>
2698         </class>
2699         <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">
2700                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2701                         <field name="bucket" />
2702                         <field name="id" reporter:datatype="id" />
2703                         <field name="target_copy" reporter:datatype="link"/>
2704                         <field name="create_time" reporter:datatype="timestamp" />
2705                         <field name="pos" reporter:datatype="int" />
2706                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2707                 </fields>
2708                 <links>
2709                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2710                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2711             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2712                 </links>
2713                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2714                         <actions>
2715                                 <retrieve permission="ADMIN_COPY_BUCKET">
2716                     <context link="bucket" owning_lib="owning_lib"/>
2717                 </retrieve>
2718             </actions>
2719         </permacrud>
2720         </class>
2721         <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">
2722                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2723                         <field name="id" reporter:datatype="id" />
2724                         <field name="item" reporter:datatype="link"/>
2725                         <field name="note" reporter:datatype="text" />
2726                 </fields>
2727                 <links>
2728                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2729                 </links>
2730         </class>
2731
2732         <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">
2733                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2734                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2735                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2736                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2737                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2738                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2739                 </fields>
2740                 <links>
2741                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2742                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2743                 </links>
2744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2745                         <actions>
2746                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2747                                 <retrieve/>
2748                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2749                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2750                         </actions>
2751                 </permacrud>
2752         </class>
2753
2754         <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">
2755                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2756                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2757                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2758                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2759                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2760                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2761                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2762                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2763                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2764                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2765                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2766                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2767                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2768                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2769                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2770                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2771                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2772                 </fields>
2773                 <links>
2774                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2775                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2776                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2777                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2778                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2779                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2780                         <link field="heading_field" reltype="has_a" key="id" map="" class="ahf"/>
2781                 </links>
2782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2783                         <actions>
2784                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2785                                 <retrieve/>
2786                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2787                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2788                         </actions>
2789                 </permacrud>
2790         </class>
2791
2792         <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">
2793                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2794                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2795                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2796                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2797                 </fields>
2798                 <links>
2799                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2800                 </links>
2801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2802                         <actions>
2803                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2804                                 <retrieve/>
2805                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2806                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2807                         </actions>
2808                 </permacrud>
2809         </class>
2810
2811         <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">
2812                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2813                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2814                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2815                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2816                 </fields>
2817                 <links>
2818                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2819                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2820                 </links>
2821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2822                         <actions>
2823                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2824                                 <retrieve/>
2825                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2826                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2827                         </actions>
2828                 </permacrud>
2829         </class>
2830
2831         <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">
2832                 <fields oils_persist:primary="code">
2833                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2834                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2835                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2836                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2837                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2838                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2839                 </fields>
2840                 <links>
2841                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2842                 </links>
2843                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2844                         <actions>
2845                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2846                                 <retrieve/>
2847                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2848                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2849                         </actions>
2850                 </permacrud>
2851         </class>
2852
2853         <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">
2854                 <fields oils_persist:primary="code">
2855                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2856                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2857                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2858                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2859                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2860                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2861                 </fields>
2862                 <links>
2863                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2864                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2865                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2866                 </links>
2867                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2868                         <actions>
2869                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2870                                 <retrieve/>
2871                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2872                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2873                         </actions>
2874                 </permacrud>
2875         </class>
2876
2877     <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">
2878         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2879             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2880             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2881             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2882         </fields>
2883         <links>
2884             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2885             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2886         </links>
2887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2888             <actions>
2889                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2890                 <retrieve/>
2891                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2892                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2893             </actions>
2894         </permacrud>
2895     </class>
2896
2897         <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">
2898                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2899                         <field name="active" reporter:datatype="bool"/>
2900                         <field name="create_date" reporter:datatype="timestamp"/>
2901                         <field name="creator" />
2902                         <field name="deleted" reporter:datatype="bool"/>
2903                         <field name="edit_date" reporter:datatype="timestamp"/>
2904                         <field name="editor" />
2905                         <field name="id" reporter:datatype="id" />
2906                         <field name="last_xact_id" />
2907                         <field name="marc" />
2908                         <field name="source" />
2909                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2910                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2911                         <field name="heading" />
2912                         <field name="simple_heading" />
2913                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2914                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2915                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2916                 </fields>
2917                 <links>
2918                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2919                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2920                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2921                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2922                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2923                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2924                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2925                 </links>
2926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2927                         <actions>
2928                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2929                                 <retrieve/>
2930                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2931                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2932                         </actions>
2933                 </permacrud>
2934         </class>
2935         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2936                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2937                         <field name="char_encoding" />
2938                         <field name="id" />
2939                         <field name="record" />
2940                         <field name="record_status" />
2941                         <field name="thesaurus" />
2942                 </fields>
2943                 <links>
2944                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2945                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2946                 </links>
2947         </class>
2948         <class id="abl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2949                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2950                         <field name="id" reporter:datatype="id" />
2951                         <field name="bib" reporter:datatype="link" />
2952                         <field name="authority" reporter:datatype="link" />
2953                 </fields>
2954                 <links>
2955                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2956                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2957                 </links>
2958                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2959                         <actions>
2960                                 <retrieve/>
2961                         </actions>
2962                 </permacrud>
2963         </class>
2964         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2965                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2966                         <field name="id" reporter:datatype="id" />
2967                         <field name="record" reporter:datatype="link" />
2968                         <field name="atag" reporter:datatype="link" />
2969                         <field name="value" reporter:datatype="text" />
2970                         <field name="thesaurus" reporter:datatype="text" />
2971                 </fields>
2972                 <links>
2973                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2974                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2975                 </links>
2976         </class>
2977
2978         <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">
2979                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2980                         <field name="id" reporter:datatype="id" reporter:selector="label" />
2981                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2982                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2983                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2984                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2985                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2986                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2987                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2988                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2989                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2990                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2991                 </fields>
2992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2993                         <actions>
2994                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2995                                 <retrieve/>
2996                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2997                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2998                         </actions>
2999                 </permacrud>
3000         </class>
3001
3002         <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">
3003                 <fields oils_persist:primary="code" oils_persist:sequence="">
3004                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3005                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3006                 </fields>
3007                 <links/>
3008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3009             <actions>
3010                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3011                 <retrieve/>
3012                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3013                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3014             </actions>
3015         </permacrud>
3016         </class>
3017         <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">
3018                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3019                         <field name="accepting_usr" />
3020                         <field name="amount" reporter:datatype="money" />
3021                         <field name="amount_collected" reporter:datatype="money" />
3022                         <field name="approval_code" reporter:datatype="text"/>
3023                         <field name="cash_drawer" reporter:datatype="link"/>
3024                         <field name="cc_number" reporter:datatype="text"/>
3025                         <field name="cc_order_number" reporter:datatype="text"/>
3026                         <field name="cc_processor" reporter:datatype="text"/>
3027                         <field name="id" reporter:datatype="id" />
3028                         <field name="note" reporter:datatype="text"/>
3029                         <field name="payment_ts" reporter:datatype="timestamp"/>
3030                         <field name="xact" reporter:datatype="link"/>
3031                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3032                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3033                 </fields>
3034                 <links>
3035                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3036                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3037                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3038                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3039                 </links>
3040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3041             <actions>
3042                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3043                     <context link="xact" jump="usr" field="home_ou"/>
3044                 </retrieve>
3045                         </actions>
3046                 </permacrud>
3047         </class>
3048         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition" oils_persist:field_safe="true">
3049                 <fields oils_persist:primary="name">
3050                         <field reporter:label="Name" name="name" reporter:datatype="text" />
3051                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
3052                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
3053                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
3054                 </fields>
3055                 <links/>
3056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3057             <actions>
3058                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
3059                 <retrieve/>
3060                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
3061                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
3062             </actions>
3063         </permacrud>
3064         </class>
3065
3066         <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">
3067                 <fields oils_persist:primary="alias">
3068                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
3069                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
3070                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
3071                 </fields>
3072                 <links>
3073                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3074                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3075                 </links>
3076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3077             <actions>
3078                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
3079                 <retrieve/>
3080                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
3081                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
3082             </actions>
3083         </permacrud>
3084         </class>
3085
3086         <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">
3087                 <fields oils_persist:primary="name">
3088                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
3089                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3090                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
3091                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
3092                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
3093                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
3094                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
3095                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
3096                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
3097                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
3098                 </fields>
3099                 <links>
3100                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
3101                 </links>
3102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3103             <actions>
3104                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
3105                 <retrieve/>
3106                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
3107                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
3108             </actions>
3109         </permacrud>
3110         </class>
3111
3112         <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">
3113                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
3114                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
3115                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
3116                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3117                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3118                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
3119                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
3120                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
3121                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
3122                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
3123                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
3124                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
3125                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
3126                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
3127                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
3128                         <field reporter:label="Browse Folding is Case-Insensitive" name="browse_nocase" reporter:datatype="bool" />
3129                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
3130                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
3131                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
3132                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
3133                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
3134                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
3135                 </fields>
3136                 <links>
3137                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
3138                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3139                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
3140                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
3141                 </links>
3142         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3143             <actions>
3144                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3145                 <retrieve/>
3146                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3147                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3148             </actions>
3149         </permacrud>
3150         </class>
3151
3152         <class id="cmfvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_virtual_map" oils_persist:tablename="config.metabib_field_virtual_map" reporter:label="Metabib Field Virtual Map" oils_persist:field_safe="true">
3153                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
3154                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3155                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
3156                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link" config_field="true"/>
3157                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
3158                 </fields>
3159                 <links>
3160                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
3161                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
3162                 </links>
3163         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3164             <actions>
3165                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3166                 <retrieve/>
3167                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3168                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3169             </actions>
3170         </permacrud>
3171         </class>
3172
3173         <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">
3174                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
3175                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
3176                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3177                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
3178                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
3179                         <field reporter:label="Owning Lib to Patron Home Lib Proximity" name="owning_lib_to_home_lib_prox" reporter:datatype="int" />
3180                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
3181                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
3182                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
3183                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
3184                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
3185                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
3186                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
3187                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
3188                 </fields>
3189                 <links>
3190                 </links>
3191                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3192                         <actions>
3193                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3194                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3195                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3196                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3197                         </actions>
3198                 </permacrud>
3199         </class>
3200         <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">
3201                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
3202                         <field name="id" reporter:datatype="id" />
3203                         <field name="name" reporter:datatype="text"/>
3204                         <field name="xpath" reporter:datatype="text"/>
3205                         <field name="format" reporter:datatype="link"/>
3206                         <field name="first_word" reporter:datatype="bool" />
3207                 </fields>
3208                 <links/>
3209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3210             <actions>
3211                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3212                 <retrieve/>
3213                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3214                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3215             </actions>
3216         </permacrud>
3217         </class>
3218         <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">
3219                 <fields oils_persist:primary="code" oils_persist:sequence="">
3220                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3221                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3222                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3223                 </fields>
3224                 <links/>
3225         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3226             <actions>
3227                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3228                 <retrieve/>
3229                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3230                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3231             </actions>
3232         </permacrud>
3233         </class>
3234         <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">
3235                 <fields oils_persist:primary="code" oils_persist:sequence="">
3236                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3237                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3238                 </fields>
3239                 <links/>
3240         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3241             <actions>
3242                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3243                 <retrieve/>
3244                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3245                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3246             </actions>
3247         </permacrud>
3248         </class>
3249     <class id="acmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course" oils_persist:tablename="asset.course_module_course" reporter:label="Course">
3250         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_id_seq">
3251             <field reporter:label="ID" name="id" reporter:datatype="id" />
3252             <field reporter:label="Course Name" name="name" reporter:datatype="text" oils_obj:required="true" />
3253             <field reporter:label="Course Number" name="course_number" reporter:datatype="text" oils_obj:required="true" />
3254             <field reporter:label="Section Number" name="section_number" reporter:datatype="text" />
3255             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3256             <field reporter:label="Course Members" name="members" oils_persist:virtual="true" reporter:datatype="link" />
3257             <field reporter:label="Course Materials" name="materials" oils_persist:virtual="true" reporter:datatype="link" />
3258             <field reporter:label="Is Archived?" name="is_archived" reporter:datatype="bool" />
3259                         <field reporter:label="Terms Taught" name="terms_map" oils_persist:virtual="true" reporter:datatype="link" config_field="true" />
3260         </fields>
3261         <links>
3262             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3263             <link field="members" reltype="has_many" key="course" map="" class="acmcu" />
3264             <link field="materials" reltype="has_many" key="course" map="" class="acmcm" />
3265                         <link field="terms_map" reltype="has_many" key="course" map="" class="acmtcm" />
3266         </links>
3267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3268             <actions>
3269                 <create permission="MANAGE_RESERVES" context_field="owning_lib"/>
3270                 <retrieve/>
3271                 <update permission="MANAGE_RESERVES" context_field="owning_lib"/>
3272                 <delete permission="MANAGE_RESERVES" context_field="owning_lib"/>
3273             </actions>
3274         </permacrud>
3275     </class>
3276     <class id="acmcu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course_users" oils_persist:tablename="asset.course_module_course_users" reporter:label="Course Users">
3277         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_users_id_seq">
3278             <field reporter:label="ID" name="id" reporter:datatype="id" />
3279             <field reporter:label="Course" name="course" reporter:datatype="link" />
3280             <field reporter:label="User" name="usr" reporter:datatype="link" />
3281             <field reporter:label="User Role" name="usr_role" reporter:datatype="link" />
3282         </fields>
3283         <links>
3284             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3285             <link field="usr" reltype="has_a" key="id" map="" class="au" />
3286             <link field="usr_role" reltype="has_a" key="id" map="" class="acmr" />
3287         </links>
3288         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3289             <actions>
3290                 <create permission="MANAGE_RESERVES">
3291                                         <context link="course" field="owning_lib" />
3292                 </create>
3293                 <retrieve/>
3294                 <update permission="MANAGE_RESERVES">
3295                                         <context link="course" field="owning_lib" />
3296                 </update>
3297                 <delete permission="MANAGE_RESERVES">
3298                                         <context link="course" field="owning_lib" />
3299                 </delete>
3300             </actions>
3301         </permacrud>
3302     </class>
3303     <class id="acmcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_course_materials" oils_persist:tablename="asset.course_module_course_materials" reporter:label="Course Materials" oils_persist:field_safe="true">
3304         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_materials_id_seq">
3305             <field reporter:label="ID" name="id" reporter:datatype="id" />
3306             <field reporter:label="Course" name="course" reporter:datatype="link" />
3307             <field reporter:label="Item" name="item" reporter:datatype="link" />
3308             <field reporter:label="Record" name="record" reporter:datatype="link" />
3309             <field reporter:label="Record is temporary?" name="temporary_record" reporter:datatype="bool" />
3310             <field reporter:label="Item Relationship" name="relationship" reporter:datatype="text" />
3311             <field reporter:label="Original Status" name="original_status" reporter:datatype="link" />
3312             <field reporter:label="Original Circ Modifier" name="original_circ_modifier" reporter:datatype="link" />
3313             <field reporter:label="Original Shelving Location" name="original_location" reporter:datatype="link" />
3314             <field reporter:label="Original Callnumber" name="original_callnumber" reporter:datatype="link" />
3315         </fields>
3316         <links>
3317             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3318             <link field="item" reltype="has_a" key="id" map="" class="acp" />
3319             <link field="record" reltype="has_a" key="id" map="" class="bre" />
3320             <link field="original_callnumber" reltype="has_a" key="id" map="" class="acn" />
3321             <link field="original_status" reltype="has_a" key="id" map="" class="ccs" />
3322             <link field="original_circ_modifier" reltype="has_a" key="code" map="" class="ccm" />
3323             <link field="original_location" reltype="has_a" key="id" map="" class="acpl" />
3324         </links>
3325         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3326             <actions>
3327                 <create permission="MANAGE_RESERVES">
3328                                         <context link="course" field="owning_lib" />
3329                 </create>
3330                 <retrieve/>
3331                 <update permission="MANAGE_RESERVES">
3332                                         <context link="course" field="owning_lib" />
3333                 </update>
3334                 <delete permission="MANAGE_RESERVES">
3335                                         <context link="course" field="owning_lib" />
3336                 </delete>
3337             </actions>
3338         </permacrud>
3339     </class>
3340         <class id="acmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_term" oils_persist:tablename="asset.course_module_term" reporter:label="Term" oils_persist:field_safe="true">
3341                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_id_seq">
3342                         <field reporter:label="Term ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3343                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3344             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3345                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3346                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3347                         <field reporter:label="Courses" name="courses" reporter:datatype="link" oils_persist:virtual="true"/>
3348                         <field reporter:label="Course Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
3349                 </fields>
3350                 <links>
3351             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3352                         <link field="courses" reltype="has_many" key="term" map="course" class="acmtcm"/>
3353                         <link field="maps" reltype="has_many" key="term" map="" class="acmtcm"/>
3354                 </links>
3355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3356                         <actions>
3357                                 <create permission="MANAGE_RESERVES" context_field="owning_lib" />
3358                                 <retrieve/>
3359                                 <update permission="MANAGE_RESERVES" context_field="owning_lib" />
3360                                 <delete permission="MANAGE_RESERVES" context_field="owning_lib" />
3361                         </actions>
3362                 </permacrud>
3363         </class>
3364     <class id="acmtcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_term_course_map" oils_persist:tablename="asset.course_module_term_course_map" reporter:label="Course Term Map" oils_persist:field_safe="true">
3365         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_course_map_id_seq">
3366             <field reporter:label="Course Term Map ID" name="id" reporter:datatype="id"/>
3367             <field reporter:label="Term" name="term" oils_obj:required="true" reporter:datatype="link"/>
3368             <field reporter:label="Course" name="course" reporter:datatype="link" oils_obj:required="true"/>
3369         </fields>
3370         <links>
3371             <link field="term" reltype="has_a" key="id" map="" class="acmt"/>
3372             <link field="course" reltype="has_a" key="id" map="" class="acmc"/>
3373         </links>
3374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3375             <actions>
3376                 <create permission="MANAGE_RESERVES">
3377                                         <context link="course" field="owning_lib" />
3378                 </create>
3379                 <retrieve/>
3380                 <update permission="MANAGE_RESERVES">
3381                                         <context link="course" field="owning_lib" />
3382                 </update>
3383                 <delete permission="MANAGE_RESERVES">
3384                                         <context link="course" field="owning_lib" />
3385                 </delete>
3386             </actions>
3387         </permacrud>
3388     </class>
3389         <class id="acmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::course_module_role" oils_persist:tablename="asset.course_module_role" reporter:label="Course Role" oils_persist:field_safe="true">
3390                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_role_id_seq">
3391                         <field reporter:label="Role ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3392                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3393             <field reporter:label="OPAC Viewable?" name="is_public" reporter:datatype="bool" />
3394                 </fields>
3395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3396                         <actions>
3397                                 <create permission="MANAGE_RESERVES" global_required="true" />
3398                                 <retrieve/>
3399                                 <update permission="MANAGE_RESERVES" global_required="true" />
3400                                 <delete permission="MANAGE_RESERVES" global_required="true" />
3401                         </actions>
3402                 </permacrud>
3403         </class>
3404         
3405     <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">
3406         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3407             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3408             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3409             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3410             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3411         </fields>
3412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3413             <actions>
3414                 <retrieve/>
3415             </actions>
3416         </permacrud>
3417     </class>
3418         <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">
3419                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3420                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3421                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3422                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3423                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3424                 </fields>
3425                 <links>
3426                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3427                 </links>
3428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3429             <actions>
3430                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3431                 <retrieve/>
3432                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3433                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3434             </actions>
3435         </permacrud>
3436         </class>
3437         <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">
3438                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3439                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3440                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3441                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3442                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3443                 </fields>
3444                 <links>
3445                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3446                 </links>
3447         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3448             <actions>
3449                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3450                 <retrieve/>
3451                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3452                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3453             </actions>
3454         </permacrud>
3455         </class>
3456         <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">
3457                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3458                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3459                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3460                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3461                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3462                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3463                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3464                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3465                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3466                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3467                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3468                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3469                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3470                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3471                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3472                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3473                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3474                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3475                         <field reporter:label="Dewey Classification" name="dewey" oils_persist:virtual="true" reporter:datatype="link"/>
3476                 </fields>
3477                 <links>
3478                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3479                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3480                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3481                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3482                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3483                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3484                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3485                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3486                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3487                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3488                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3489                         <link field="dewey" reltype="might_have" key="call_number" map="" class="racnd"/>
3490                 </links>
3491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3492             <actions>
3493                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3494                 <retrieve/>
3495                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3496                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3497             </actions>
3498         </permacrud>
3499         </class>
3500         <class id="racnd" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="reporter::asset_call_number_dewey" oils_persist:tablename="reporter.asset_call_number_dewey" reporter:label="Dewey Classification">
3501                 <fields oils_persist:primary="call_number">
3502                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link" />
3503                         <field reporter:label="Dewey Number" name="dewey" reporter:datatype="text"/>
3504                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
3505                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
3506                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
3507                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
3508                 </fields>
3509                 <links>
3510                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3511                 </links>
3512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3513             <actions>
3514                 <retrieve/>
3515             </actions>
3516         </permacrud>
3517         </class>
3518         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3519                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3520                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3521                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3522                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3523                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3524                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3525                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3526                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3527                 </fields>
3528                 <links>
3529                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3530                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3531         </links>
3532         </class>
3533         <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">
3534                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3535                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3536                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3537                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3538                 </fields>
3539                 <links>
3540                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3541                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3542                 </links>
3543         </class>
3544         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3545                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3546                         <field name="id" reporter:datatype="id" />
3547                         <field name="value" oils_persist:i18n="true" />
3548                 </fields>
3549                 <links/>
3550         </class>
3551         <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">
3552                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3553                         <field name="balance_owed" reporter:datatype="money" />
3554                         <field name="total_owed" reporter:datatype="money" />
3555                         <field name="total_paid" reporter:datatype="money" />
3556                         <field name="usr" reporter:datatype="link"/>
3557                 </fields>
3558                 <links>
3559                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3560         </links>
3561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3562             <actions>
3563                 <retrieve permission="VIEW_USER">
3564                     <context link="usr" field="home_ou"/>
3565                 </retrieve>
3566             </actions>
3567         </permacrud>
3568         </class>
3569         <class id="mowbus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_with_balance_user_summary" oils_persist:tablename="money.open_with_balance_usr_summary" reporter:label="Open User Summary for transactions with balances">
3570                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3571                         <field name="balance_owed" reporter:datatype="money" />
3572                         <field name="total_owed" reporter:datatype="money" />
3573                         <field name="total_paid" reporter:datatype="money" />
3574                         <field name="usr" reporter:datatype="link"/>
3575                 </fields>
3576                 <links>
3577                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3578         </links>
3579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3580             <actions>
3581                 <retrieve permission="VIEW_USER">
3582                     <context link="usr" field="home_ou"/>
3583                 </retrieve>
3584             </actions>
3585         </permacrud>
3586         </class>
3587         <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">
3588                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3589                         <field name="collector" />
3590                         <field name="enter_time" reporter:datatype="timestamp"/>
3591                         <field name="id" reporter:datatype="id" />
3592                         <field name="location" reporter:datatype="link"/>
3593                         <field name="usr" reporter:datatype="link"/>
3594                 </fields>
3595                 <links>
3596                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3597                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3598                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3599                 </links>
3600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3601             <actions>
3602                 <create permission="money.collections_tracker.create" context_field="location"/>
3603                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3604                 <delete permission="money.collections_tracker.create" context_field="location"/>
3605             </actions>
3606         </permacrud>
3607         </class>
3608         <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">
3609                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3610                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3611                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3612                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3613                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3614                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3615                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3616                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3617                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3618                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3619                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3620                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3621                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3622                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3623                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3624                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3625                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3626                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3627                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3628                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3629                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3630                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3631                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3632                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3638                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3639                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3640                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3641                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3642                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3643                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3644                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3645                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3646                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3647                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3648                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3649                 </fields>
3650                 <links>
3651                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3652                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3653                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3654                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3655                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3656                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3657                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3658                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3659                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3660                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3661                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3662                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3663                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3664                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3665                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3666                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3667                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3668                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3669                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3670                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3671                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3672                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3673                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3674                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3675                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3676                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3677                 </links>
3678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3679             <actions>
3680                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3681                 <retrieve/>
3682                 <update permission="UPDATE_MARC" global_required="true"/>
3683                 <!-- 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. -->
3684                 <delete permission="DELETE_RECORD" global_required="true"/>
3685             </actions>
3686         </permacrud>
3687         </class>
3688         <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">
3689                 <fields oils_persist:primary="id">
3690                         <field name="dow_0_close" />
3691                         <field name="dow_0_open" />
3692                         <field name="dow_1_close" />
3693                         <field name="dow_1_open" />
3694                         <field name="dow_2_close" />
3695                         <field name="dow_2_open" />
3696                         <field name="dow_3_close" />
3697                         <field name="dow_3_open" />
3698                         <field name="dow_4_close" />
3699                         <field name="dow_4_open" />
3700                         <field name="dow_5_close" />
3701                         <field name="dow_5_open" />
3702                         <field name="dow_6_close" />
3703                         <field name="dow_6_open" />
3704                         <field name="id" reporter:datatype="id" />
3705                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3706                 </fields>
3707                 <links>
3708                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3709                 </links>
3710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3711             <actions>
3712                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3713                 <retrieve/>
3714                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3715                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3716             </actions>
3717         </permacrud>
3718         </class>
3719         <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">
3720                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3721                         <field name="id" reporter:datatype="id" />
3722                         <field name="record" reporter:datatype="link"/>
3723                         <field name="label" reporter:datatype="text"/>
3724                         <field name="label_sortkey" reporter:datatype="text"/>
3725                         <field name="deleted" reporter:datatype="bool"/>
3726                 </fields>
3727                 <links>
3728                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3729                 </links>
3730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3731             <actions>
3732                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3733                 <retrieve/>
3734                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3735                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3736             </actions>
3737         </permacrud>
3738         </class>
3739         <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">
3740                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3741                         <field name="id" reporter:datatype="id" />
3742                         <field name="target_copy" reporter:datatype="link" />
3743                         <field name="part" reporter:datatype="link"/>
3744                 </fields>
3745                 <links>
3746                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3747                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3748                 </links>
3749         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3750             <actions>
3751                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3752                 <retrieve/>
3753                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3754                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3755             </actions>
3756         </permacrud>
3757         </class>
3758     <class  id="aecc"
3759             controller="open-ils.cstore open-ils.pcrud"
3760             oils_obj:fieldmapper="action::emergency_closing_circulation"
3761             oils_persist:tablename="action.emergency_closing_circulation"
3762             reporter:label="Emergency Closing Circulation Entry"
3763             oils_persist:readonly="true"
3764     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3765         <fields oils_persist:primary="id">
3766             <field name="id" reporter:datatype="id" />
3767             <field name="circulation" reporter:datatype="link" />
3768                         <field name="emergency_closing" reporter:datatype="link"/>
3769             <field name="original_due_date" reporter:datatype="timestamp" />
3770             <field name="process_time" reporter:datatype="timestamp" />
3771         </fields>
3772         <links>
3773             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3774             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3775         </links>
3776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3777             <actions>
3778                 <retrieve/>
3779             </actions>
3780         </permacrud>
3781     </class>
3782     <class  id="aecr"
3783             controller="open-ils.cstore open-ils.pcrud"
3784             oils_obj:fieldmapper="action::emergency_closing_reservation"
3785             oils_persist:tablename="action.emergency_closing_reservation"
3786             reporter:label="Emergency Closing Reservation Entry"
3787             oils_persist:readonly="true"
3788     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3789         <fields oils_persist:primary="id">
3790             <field name="id" reporter:datatype="id" />
3791             <field name="reservation" reporter:datatype="link" />
3792                         <field name="emergency_closing" reporter:datatype="link"/>
3793             <field name="original_end_time" reporter:datatype="timestamp" />
3794             <field name="process_time" reporter:datatype="timestamp" />
3795         </fields>
3796         <links>
3797             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3798             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3799         </links>
3800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3801             <actions>
3802                 <retrieve/>
3803             </actions>
3804         </permacrud>
3805     </class>
3806     <class  id="aech"
3807             controller="open-ils.cstore open-ils.pcrud"
3808             oils_obj:fieldmapper="action::emergency_closing_hold"
3809             oils_persist:tablename="action.emergency_closing_hold"
3810             reporter:label="Emergency Closing Hold Entry"
3811             oils_persist:readonly="true"
3812     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3813         <fields oils_persist:primary="id">
3814             <field name="id" reporter:datatype="id" />
3815             <field name="hold" reporter:datatype="link" />
3816                         <field name="emergency_closing" reporter:datatype="link"/>
3817             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3818             <field name="process_time" reporter:datatype="timestamp" />
3819         </fields>
3820         <links>
3821             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3822             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3823         </links>
3824         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3825             <actions>
3826                 <retrieve/>
3827             </actions>
3828         </permacrud>
3829     </class>
3830     <class  id="aecs"
3831             controller="open-ils.cstore open-ils.pcrud"
3832             oils_obj:fieldmapper="action::emergency_closing_status"
3833             oils_persist:tablename="action.emergency_closing_status"
3834             reporter:label="Emergency Closing Status"
3835             oils_persist:readonly="true"
3836     >
3837         <fields oils_persist:primary="id">
3838             <field name="id" reporter:datatype="id" />
3839             <field name="creator" reporter:datatype="link" />
3840             <field name="create_time" reporter:datatype="timestamp" />
3841             <field name="process_start_time" reporter:datatype="timestamp" />
3842             <field name="process_end_time" reporter:datatype="timestamp" />
3843             <field name="last_update_time" reporter:datatype="timestamp" />
3844             <field name="circulations" reporter:datatype="int" />
3845             <field name="circulations_complete" reporter:datatype="int" />
3846             <field name="reservations" reporter:datatype="int" />
3847             <field name="reservations_complete" reporter:datatype="int" />
3848             <field name="holds" reporter:datatype="int" />
3849             <field name="holds_complete" reporter:datatype="int" />
3850         </fields>
3851         <links>
3852             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3853         </links>
3854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3855             <actions>
3856                 <retrieve/>
3857             </actions>
3858         </permacrud>
3859     </class>
3860     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3861         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3862             <field name="id" reporter:datatype="id" />
3863             <field name="creator" reporter:datatype="link" />
3864             <field name="create_time" reporter:datatype="timestamp" />
3865             <field name="process_start_time" reporter:datatype="timestamp" />
3866             <field name="process_end_time" reporter:datatype="timestamp" />
3867             <field name="last_update_time" reporter:datatype="timestamp" />
3868             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3869             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3870             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3871             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3872             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3873         </fields>
3874         <links>
3875             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3876             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3877             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3878             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3879             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3880             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3881         </links>
3882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3883             <actions>
3884                 <create permission="EMERGENCY_CLOSING">
3885                     <context link="closing" field="org_unit" />
3886                 </create>
3887                 <retrieve/>
3888                 <update permission="EMERGENCY_CLOSING">
3889                     <context link="closing" field="org_unit" />
3890                 </update>
3891                 <delete permission="EMERGENCY_CLOSING">
3892                     <context link="closing" field="org_unit" />
3893                 </delete>
3894             </actions>
3895         </permacrud>
3896     </class>
3897         <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">
3898                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3899                         <field name="close_end" reporter:datatype="timestamp" />
3900                         <field name="close_start" reporter:datatype="timestamp" />
3901                         <field name="id" reporter:datatype="id" />
3902                         <field name="org_unit" reporter:datatype="org_unit"/>
3903                         <field name="reason" reporter:datatype="text"/>
3904                         <field name="full_day" reporter:datatype="bool"/>
3905                         <field name="multi_day" reporter:datatype="bool"/>
3906                         <field name="emergency_closing" reporter:datatype="link"/>
3907                 </fields>
3908                 <links>
3909                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3910                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3911                 </links>
3912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3913             <actions>
3914                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3915                 <retrieve/>
3916                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3917                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3918             </actions>
3919         </permacrud>
3920         </class>
3921         <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">
3922                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3923                         <field name="extended" reporter:datatype="interval"/>
3924                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3925                         <field name="max_renewals" reporter:datatype="int" />
3926                         <field name="name" reporter:datatype="text"/>
3927                         <field name="normal" reporter:datatype="interval"/>
3928                         <field name="shrt" reporter:datatype="interval"/>
3929                         <field name="max_auto_renewals" reporter:datatype="int" />
3930                 </fields>
3931                 <links>
3932                 </links>
3933         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3934             <actions>
3935                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3936                 <retrieve/>
3937                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3938                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3939             </actions>
3940         </permacrud>
3941         </class>
3942
3943         <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">
3944                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3945                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3946                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3947             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3948                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3949             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3950                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3951                                 reporter:datatype="link" config_field="true"/>
3952                 </fields>
3953                 <links>
3954             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3955                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3956                 </links>
3957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3958             <actions>
3959                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3960                 <retrieve/>
3961                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3962                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3963             </actions>
3964                 </permacrud>
3965         </class>
3966
3967         <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">
3968                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3969                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3970                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3971                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3972             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3973                 </fields>
3974                 <links>
3975                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3976                 </links>
3977                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3978             <actions>
3979                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3980                 <retrieve/>
3981                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3982                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3983             </actions>
3984                 </permacrud>
3985         </class>
3986
3987         <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">
3988                 <fields oils_persist:primary="id" oils_persist:sequence="">
3989                         <field name="balance_owed" reporter:datatype="money"/>
3990                         <field name="id" reporter:datatype="id" />
3991                         <field name="last_billing_note" reporter:datatype="text"/>
3992                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3993                         <field name="last_billing_type" reporter:datatype="text"/>
3994                         <field name="last_payment_note" reporter:datatype="text"/>
3995                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3996                         <field name="last_payment_type" reporter:datatype="text"/>
3997                         <field name="total_owed" reporter:datatype="money"/>
3998                         <field name="total_paid" reporter:datatype="money"/>
3999                         <field name="usr" reporter:datatype="link"/>
4000                         <field name="xact_finish" reporter:datatype="timestamp" />
4001                         <field name="xact_start" reporter:datatype="timestamp" />
4002                         <field name="xact_type" reporter:datatype="text"/>
4003                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
4004                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4005                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4006                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
4007                         <field name="billing_location" reporter:datatype="link"/>
4008                 </fields>
4009                 <links>
4010                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4011                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
4012                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4013                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4014                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
4015                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4016                 </links>
4017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4018                         <actions>
4019                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4020                                         <context link="usr" field="home_ou" />
4021                                 </retrieve>
4022                         </actions>
4023                 </permacrud>
4024         </class>
4025         <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">
4026                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
4027                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4028                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
4029                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
4030                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4031                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
4032                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4033                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
4034                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4035                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
4036                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4037                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
4038                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
4039                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4040                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
4041                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
4042                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
4043                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
4044                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
4045                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4046                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
4047                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
4048                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
4049                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
4050                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
4051                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
4052                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
4053                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
4054                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
4055                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
4056                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
4057                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
4058                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
4059                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
4060                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4061                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4062                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
4063                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
4064                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
4065                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
4066                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
4067                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
4068                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
4069                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
4070                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
4071                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
4072                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
4073                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
4074                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
4075                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
4076                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
4077                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
4078                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
4079                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
4080                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
4081                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
4082                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
4083                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
4084                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
4085                         <field reporter:label="Name Keyword internal tsvector" name="name_kw_tsvector" reporter:datatype="text"/>
4086                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
4087                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4088                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4089                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
4090                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
4091                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4092                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4093                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4094                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4095                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4096                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
4097                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
4098                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
4099                 </fields>
4100                 <links>
4101                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
4102                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
4103                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
4104                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
4105                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
4106                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
4107                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
4108                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
4109                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
4110                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
4111                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
4112                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
4113                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
4114                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
4115                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
4116                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
4117                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
4118                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
4119                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
4120                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
4121                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
4122                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
4123                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
4124                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
4125                         <link field="notes" reltype="has_many" key="usr" map="" class="aum"/>
4126                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
4127                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
4128                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
4129                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
4130                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
4131                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
4132                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
4133                 </links>
4134                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4135                         <actions>
4136                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
4137                         </actions>
4138                 </permacrud>
4139         </class>
4140         <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">
4141                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
4142                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
4143                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
4144                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
4145                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
4146                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
4147                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
4148                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
4149                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
4150         </fields>
4151                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4152                         <actions>
4153                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4154                                 <retrieve/>
4155                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4156                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4157                         </actions>
4158                 </permacrud>
4159         </class>
4160         <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">
4161                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
4162                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4163                         <field name="usr" reporter:label="User" reporter:datatype="link" />
4164                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
4165                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
4166         </fields>
4167         <links>
4168                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4169                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
4170                 </links>
4171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4172                         <actions>
4173                                 <retrieve permission="RUN_REPORTS">
4174                                         <context link="usr" field="home_ou" />
4175                                 </retrieve>
4176                         </actions>
4177                 </permacrud>
4178         </class>
4179         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
4180                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
4181                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4182                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
4183                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
4184                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
4185                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
4186                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
4187         </fields>
4188         <links>
4189                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
4190                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
4191                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
4192                 </links>
4193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4194                         <actions>
4195                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
4196                                         <context link="usr" field="home_ou" />
4197                                         <context link="ws" field="owning_lib" />
4198                                 </retrieve>
4199                                 <create permission="ADMIN_TOOLBAR" context_field="org">
4200                                         <context link="usr" field="home_ou" />
4201                                         <context link="ws" field="owning_lib" />
4202                                 </create>
4203                                 <update permission="ADMIN_TOOLBAR" context_field="org">
4204                                         <context link="usr" field="home_ou" />
4205                                         <context link="ws" field="owning_lib" />
4206                                 </update>
4207                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
4208                                         <context link="usr" field="home_ou" />
4209                                         <context link="ws" field="owning_lib" />
4210                                 </delete>
4211                         </actions>
4212                 </permacrud>
4213         </class>
4214         <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">
4215                 <fields oils_persist:primary="name">
4216                         <field name="name" reporter:datatype="text"/>
4217                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4218                 </fields>
4219                 <links/>
4220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4221                         <actions>
4222                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4223                                 <retrieve/>
4224                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4225                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4226                         </actions>
4227                 </permacrud>
4228         </class>
4229         <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">
4230                 <fields oils_persist:primary="name">
4231                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
4232                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
4233                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
4234                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
4235                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
4236                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
4237                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
4238                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
4239                 </fields>
4240                 <links>
4241                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
4242                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4243                 </links>
4244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4245                         <actions>
4246                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4247                                 <retrieve/>
4248                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4249                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4250                         </actions>
4251                 </permacrud>
4252         </class>
4253         <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">
4254                 <fields oils_persist:primary="name">
4255                         <field name="name" reporter:datatype="text"/>
4256                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4257                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4258                         <field name="datatype" reporter:datatype="text"/>
4259                         <field name="view_perm" reporter:datatype="link"/>
4260                         <field name="update_perm" reporter:datatype="link"/>
4261                         <field name="fm_class" reporter:datatype="text"/>
4262                         <field name="grp" reporter:datatype="link"/>
4263                 </fields>
4264                 <links>
4265                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
4266                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
4267                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
4268                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4269                 </links>
4270                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4271                         <actions>
4272                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4273                                 <retrieve/>
4274                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4275                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4276                         </actions>
4277                 </permacrud>
4278         </class>
4279         <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">
4280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
4281                         <field name="id" />
4282                         <field name="name"  reporter:datatype="text"/>
4283                         <field name="org_unit" reporter:datatype="org_unit"/>
4284                         <field name="value"  reporter:datatype="text"/>
4285                 </fields>
4286                 <links>
4287                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4288                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
4289                 </links>
4290         </class>
4291         <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">
4292                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
4293                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4294                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
4295                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
4296                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
4297                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
4298                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
4299                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
4300                 </fields>
4301                 <links>
4302                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4303                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4304                 </links>
4305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4306             <actions>
4307                 <create permission="CREATE_COPY_NOTE">
4308                     <context link="owning_copy" field="circ_lib"/>
4309                 </create>
4310                 <retrieve permission="VIEW_COPY_NOTES">
4311                     <context link="owning_copy" field="circ_lib"/>
4312                 </retrieve>
4313                 <update permission="UPDATE_COPY_NOTE">
4314                     <context link="owning_copy" field="circ_lib"/>
4315                 </update>
4316                 <delete permission="DELETE_COPY_NOTE">
4317                     <context link="owning_copy" field="circ_lib"/>
4318                 </delete>
4319             </actions>
4320         </permacrud>
4321         </class>
4322         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
4323                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
4324                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
4325                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
4326                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
4327                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4328                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
4329                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
4330                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
4331                 </fields>
4332                 <links>
4333                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4334                 </links>
4335         </class>
4336         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
4337                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
4338                         <field name="fingerprint"  reporter:datatype="text"/>
4339                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
4340                         <field name="master_record" reporter:datatype="link"/>
4341                         <field name="mods"  reporter:datatype="text"/>
4342                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
4343                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4344                 </fields>
4345                 <links>
4346                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
4347                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
4348                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
4349                 </links>
4350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4351                         <actions>
4352                                 <retrieve/>
4353                         </actions>
4354                 </permacrud>
4355         </class>
4356         <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">
4357                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
4358                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4359                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4360                 </fields>
4361                 <links/>
4362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4363             <actions>
4364                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
4365                 <retrieve/>
4366                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
4367                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
4368             </actions>
4369         </permacrud>
4370         </class>
4371         <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">
4372                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
4373                         <field name="code"  reporter:datatype="text"/>
4374                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
4375                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
4376                 </fields>
4377                 <links/>
4378         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4379             <actions>
4380                 <create permission="CREATE_PERM" global_required="true"/>
4381                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
4382                 <update permission="UPDATE_PERM" global_required="true"/>
4383                 <delete permission="DELETE_PERM" global_required="true"/>
4384             </actions>
4385         </permacrud>
4386         </class>
4387         <class id="mmrsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
4388                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
4389                         <field name="id" reporter:datatype="id" />
4390                         <field name="metarecord" reporter:datatype="link"/>
4391                         <field name="source" reporter:datatype="link"/>
4392                 </fields>
4393                 <links>
4394                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4395                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4396                 </links>
4397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4398                         <actions>
4399                                 <retrieve/>
4400                         </actions>
4401                 </permacrud>
4402         </class>
4403         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4404                         oils_obj:fieldmapper="metabib::display_entry" 
4405                         oils_persist:tablename="metabib.display_entry" 
4406                         oils_persist:field_safe="true"
4407                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4408                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4409                         <field name="id" reporter:datatype="id" />
4410                         <field name="field" reporter:datatype="link"/>
4411                         <field name="source" reporter:datatype="link"/>
4412                         <field name="value"  reporter:datatype="text"/>
4413                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4414                 </fields>
4415                 <links>
4416                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4417                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4418                 </links>
4419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4420                         <actions>
4421                                 <retrieve/>
4422                         </actions>
4423                 </permacrud>
4424         </class>
4425         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4426                 oils_persist:tablename="metabib.flat_display_entry"
4427                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4428                 oils_persist:field_safe="true"
4429                 reporter:label="Flat Display Entry" 
4430                 oils_persist:readonly="true">
4431                 <fields>
4432                         <field name="source" reporter:datatype="id" />
4433                         <field name="name" reporter:datatype="text"/>
4434                         <field name="multi" reporter:datatype="bool"/>
4435                         <field name="label" reporter:datatype="text"/>
4436                         <field name="field" reporter:datatype="link"/>
4437                         <field name="value" reporter:datatype="text"/>
4438                 </fields>
4439                 <links>
4440                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4441                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4442                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4443                 </links>
4444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4445                         <actions>
4446                                 <retrieve/>
4447                         </actions>
4448                 </permacrud>
4449         </class>
4450         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4451                 oils_persist:tablename="metabib.compressed_display_entry"
4452                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4453                 oils_persist:field_safe="true"
4454                 reporter:label="Compressed Display Entry" 
4455                 oils_persist:readonly="true">
4456                 <fields>
4457                         <field name="source" reporter:datatype="id" />
4458                         <field name="name" reporter:datatype="text"/>
4459                         <field name="multi" reporter:datatype="bool"/>
4460                         <field name="label" reporter:datatype="text"/>
4461                         <field name="field" reporter:datatype="link"/>
4462                         <field name="value" reporter:datatype="text"/>
4463                 </fields>
4464                 <links>
4465                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4466                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4467                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4468                 </links>
4469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4470                         <actions>
4471                                 <retrieve/>
4472                         </actions>
4473                 </permacrud>
4474         </class>
4475         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4476                 oils_persist:tablename="metabib.wide_display_entry"
4477                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4478                 oils_persist:field_safe="true"
4479                 reporter:label="Wide Display Entry" 
4480                 oils_persist:readonly="true">
4481                 <fields oils_persist:primary="source">
4482                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4483                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4484                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4485                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4486                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4487                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4488                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4489                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4490                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4491                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4492                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4493                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4494                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4495                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4496                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4497                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4498                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4499                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4500                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4501                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4502                 </fields>
4503                 <links>
4504                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4505                 </links>
4506                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4507                         <actions>
4508                                 <retrieve/>
4509                         </actions>
4510                 </permacrud>
4511         </class>
4512
4513         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4514                 oils_persist:tablename="config.display_field_map"
4515                 oils_obj:fieldmapper="config::display_field_map"
4516                 oils_persist:field_safe="true"
4517                 reporter:label="Display Field Map">
4518                 <fields oils_persist:primary="name">
4519                         <field name="name" reporter:datatype="text"/>
4520                         <field name="field" reporter:datatype="link"/>
4521                         <field name="multi" reporter:datatype="bool"/>
4522                 </fields>
4523                 <links>
4524                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4525                 </links>
4526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4527                         <actions>
4528                                 <retrieve/>
4529                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4530                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4531                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4532                         </actions>
4533                 </permacrud>
4534         </class>
4535
4536         <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">
4537                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4538                         <field name="id" reporter:datatype="id" />
4539                         <field name="field" reporter:datatype="link"/>
4540                         <field name="source" reporter:datatype="link"/>
4541                         <field name="value"  reporter:datatype="text"/>
4542                 </fields>
4543                 <links>
4544                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4545                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4546                 </links>
4547         </class>
4548         <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">
4549                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4550                         <field name="id" reporter:datatype="id" />
4551                         <field name="value" reporter:datatype="text"/>
4552                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4553                 </fields>
4554                 <links>
4555                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4556                 </links>
4557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4558                         <actions>
4559                                 <retrieve/>
4560                         </actions>
4561                 </permacrud>
4562         </class>
4563         <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">
4564                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4565                         <field name="id" reporter:datatype="id" />
4566                         <field name="entry" reporter:datatype="link"/>
4567                         <field name="def" reporter:datatype="link"/>
4568                         <field name="source" reporter:datatype="link"/>
4569                 </fields>
4570                 <links>
4571                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4572                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4573                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4574                 </links>
4575         </class>
4576         <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">
4577                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4578                         <field name="id" reporter:datatype="id" />
4579                         <field name="entry" reporter:datatype="link"/>
4580                         <field name="simple_heading" reporter:datatype="link"/>
4581                 </fields>
4582                 <links>
4583                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4584                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4585                 </links>
4586         </class>
4587         <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">
4588                 <oils_persist:source_definition><![CDATA[
4589                         SELECT * FROM metabib.author_field_entry
4590                                                 UNION ALL
4591                         SELECT * FROM metabib.keyword_field_entry
4592                                                 UNION ALL
4593                         SELECT * FROM metabib.identifier_field_entry
4594                                                 UNION ALL
4595                         SELECT * FROM metabib.title_field_entry
4596                                                 UNION ALL
4597                         SELECT * FROM metabib.subject_field_entry
4598                                                 UNION ALL
4599                         SELECT * FROM metabib.series_field_entry
4600                 ]]></oils_persist:source_definition>
4601                 <fields>
4602                         <field name="field" reporter:datatype="link"/>
4603                         <field name="id" reporter:datatype="id" />
4604                         <field name="source" reporter:datatype="link"/>
4605                         <field name="value"  reporter:datatype="text"/>
4606                 </fields>
4607                 <links>
4608                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4609                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4610                 </links>
4611         </class>
4612         <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">
4613                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4614                         <field name="field" reporter:datatype="link"/>
4615                         <field name="id" reporter:datatype="id" />
4616                         <field name="source" reporter:datatype="link"/>
4617                         <field name="value"  reporter:datatype="text"/>
4618                 </fields>
4619                 <links>
4620                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4621                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4622                 </links>
4623         </class>
4624         <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">
4625                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4626                         <field name="accepting_usr" reporter:datatype="link"/>
4627                         <field name="amount" reporter:datatype="money" />
4628                         <field name="amount_collected" reporter:datatype="money" />
4629                         <field name="cash_drawer" reporter:datatype="link"/>
4630                         <field name="id" reporter:datatype="id" />
4631                         <field name="note"  reporter:datatype="text"/>
4632                         <field name="payment_ts" reporter:datatype="timestamp"/>
4633                         <field name="xact" reporter:datatype="link"/>
4634                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4635                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4636                 </fields>
4637                 <links>
4638                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4639                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4640                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4641                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4642                 </links>
4643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4644             <actions>
4645                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4646                     <context link="xact" jump="usr" field="home_ou"/>
4647                 </retrieve>
4648                         </actions>
4649                 </permacrud>
4650         </class>
4651         <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">
4652                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4653                         <field name="accepting_usr" reporter:datatype="link"/>
4654                         <field name="amount" reporter:datatype="money" />
4655                         <field name="amount_collected" reporter:datatype="money" />
4656                         <field name="id" reporter:datatype="id" />
4657                         <field name="note"  reporter:datatype="text"/>
4658                         <field name="payment_ts" reporter:datatype="timestamp"/>
4659                         <field name="xact" reporter:datatype="link"/>
4660                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4661                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4662                 </fields>
4663                 <links>
4664                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4665                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4666                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4667                 </links>
4668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4669             <actions>
4670                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4671                     <context link="xact" jump="usr" field="home_ou"/>
4672                 </retrieve>
4673                         </actions>
4674                 </permacrud>
4675         </class>
4676         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4677                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4678                         <field name="accepting_usr" reporter:datatype="link"/>
4679                         <field name="amount" reporter:datatype="money" />
4680                         <field name="amount_collected" reporter:datatype="money" />
4681                         <field name="id" reporter:datatype="id" />
4682                         <field name="note"  reporter:datatype="text"/>
4683                         <field name="payment_ts" reporter:datatype="timestamp"/>
4684                         <field name="xact" reporter:datatype="link"/>
4685                         <field name="billing" reporter:datatype="link"/>
4686                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4687                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4688                 </fields>
4689                 <links>
4690                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4691                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4692                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4693                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4694                 </links>
4695         </class>
4696         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4697                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4698                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4699                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4700                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4701                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4702                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4703                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4704                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4705                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4706                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4707                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4708                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4709                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4710                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4711                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4712                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4713                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4714                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4715                 </fields>
4716                 <links>
4717                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4718                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4719                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4720                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4721                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4722                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4723                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4724                 </links>
4725         </class>
4726
4727         <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">
4728                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4729                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4730                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4731                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4732                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4733                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4734                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4735                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4736                 </fields>
4737                 <links/>
4738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4739             <actions>
4740                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4741                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4742                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4743                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4744             </actions>
4745         </permacrud>
4746         </class>
4747         <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">
4748                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4749                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4750                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4751                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4752                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4753                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4754                 </fields>
4755                 <links>
4756                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4757                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4758                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4759         </links>
4760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4761             <actions>
4762                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4763                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4764                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4765                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4766             </actions>
4767         </permacrud>
4768         </class>
4769         <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="Item Status" oils_persist:field_safe="true">
4770                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4771                         <field name="holdable" reporter:datatype="bool" reporter:label="Holdable"/>
4772                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4773                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
4774                         <field name="opac_visible" reporter:datatype="bool" reporter:label="OPAC Visible"/>
4775             <field name="copy_active" reporter:datatype="bool" reporter:label="Sets Item Active"/>
4776             <field name="restrict_copy_delete" reporter:datatype="bool" reporter:label="Restrict Deletion"/>
4777             <field name="is_available" reporter:datatype="bool" reporter:label="Available"/>
4778             <field name="hopeless_prone" reporter:datatype="bool" reporter:label="Prone to Hopeless Holds?"/>
4779                 </fields>
4780                 <links/>
4781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4782             <actions>
4783                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4784                 <retrieve/>
4785                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4786                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4787             </actions>
4788         </permacrud>
4789         </class>
4790         <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">
4791                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
4792                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4793                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4794                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4795                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4796                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4797                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4798                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4799                         <field name="usr_message" reporter:datatype="link" reporter:label="User Message"/>
4800                 </fields>
4801                 <links>
4802                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4803                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4804                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4805                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4806                         <link field="usr_message" reltype="has_a" key="id" map="" class="aum"/>
4807                 </links>
4808                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4809                         <actions>
4810                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4811                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4812                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4813                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4814                         </actions>
4815                 </permacrud>
4816         </class>
4817         <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">
4818                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4819                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4820                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4821                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4822                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4823                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4824                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4825                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4826                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4827                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4828                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4829                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4830                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4831                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4832                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4833                 </fields>
4834                 <links>
4835                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4836                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4837                 </links>
4838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4839                         <actions>
4840                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4841                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4842                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4843                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4844                         </actions>
4845                 </permacrud>
4846         </class>
4847         <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">
4848                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4849                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4850                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4851                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4852                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4853                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4854                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4855                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4856                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4857                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4858                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4859                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4860                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4861                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4862                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4863                 </fields>
4864                 <links>
4865                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4866                 </links>
4867                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4868                         <actions>
4869                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4870                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4871                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4872                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4873                         </actions>
4874                 </permacrud>
4875         </class>
4876
4877
4878         <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">
4879                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4880                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4881                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4882                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4883                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4884                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4885                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4886                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4887                 </fields>
4888                 <links>
4889                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4890                 </links>
4891         </class>
4892
4893         <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">
4894                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4895                         <field name="call_number" />
4896                         <field name="create_date" reporter:datatype="timestamp"/>
4897                         <field name="creator" reporter:datatype="link"/>
4898                         <field name="id" reporter:datatype="id" />
4899                         <field name="pub" reporter:datatype="bool"/>
4900                         <field name="title"  reporter:datatype="text"/>
4901                         <field name="value"  reporter:datatype="text"/>
4902                 </fields>
4903                 <links>
4904                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4905                 </links>
4906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4907             <actions>
4908                 <create permission="CREATE_VOLUME_NOTE">
4909                     <context link="call_number" field="owning_lib"/>
4910                 </create>
4911                 <retrieve permission="VIEW_VOLUME_NOTES">
4912                     <context link="call_number" field="owning_lib"/>
4913                 </retrieve>
4914                 <update permission="UPDATE_VOLUME_NOTE">
4915                     <context link="call_number" field="owning_lib"/>
4916                 </update>
4917                 <delete permission="DELETE_VOLUME_NOTE">
4918                     <context link="call_number" field="owning_lib"/>
4919                 </delete>
4920             </actions>
4921         </permacrud>
4922         </class>
4923         <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">
4924                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4925                         <field name="create_date" reporter:datatype="timestamp"/>
4926                         <field name="creator" reporter:datatype="link"/>
4927                         <field name="edit_date" reporter:datatype="timestamp"/>
4928                         <field name="editor" reporter:datatype="link"/>
4929                         <field name="id" reporter:datatype="id" />
4930                         <field name="record" reporter:datatype="link"/>
4931                         <field name="value" reporter:datatype="text"/>
4932                 </fields>
4933                 <links>
4934                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4935                 </links>
4936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4937             <actions>
4938                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4939                 <retrieve/>
4940                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4941                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4942             </actions>
4943         </permacrud>
4944         </class>
4945         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4946         <oils_persist:source_definition><![CDATA[
4947 SELECT  usr,
4948         SUM(
4949             CASE
4950                 WHEN (
4951                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4952                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4953                 ) THEN 1
4954                 ELSE 0
4955             END
4956         ) AS out,
4957
4958         SUM(
4959             CASE
4960                 WHEN (
4961                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4962                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4963                 ) THEN 1
4964                 ELSE 0
4965             END
4966         ) AS overdue,
4967
4968         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4969         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4970         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4971   FROM  action.circulation
4972   WHERE checkin_time IS NULL
4973   GROUP BY 1
4974         ]]></oils_persist:source_definition>
4975         <fields oils_persist:primary="usr">
4976             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4977             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4978             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4979             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4980             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4981             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4982         </fields>
4983         <links>
4984             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4985         </links>
4986         </class>
4987         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4988         <oils_persist:source_definition><![CDATA[
4989 SELECT  usr,
4990         STRING_AGG(
4991             CASE
4992                 WHEN (
4993                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4994                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4995                 ) THEN id::TEXT
4996                 ELSE '0'
4997             END
4998         ,',') AS out,
4999
5000         STRING_AGG(
5001             CASE
5002                 WHEN (
5003                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
5004                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
5005                 ) THEN id::TEXT
5006                 ELSE '0'
5007             END
5008         ,',') AS overdue,
5009
5010         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
5011         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
5012         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
5013   FROM  action.circulation
5014   WHERE checkin_time IS NULL
5015   GROUP BY 1
5016         ]]></oils_persist:source_definition>
5017         <fields oils_persist:primary="usr">
5018             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
5019             <field reporter:label="Out" name="out" reporter:datatype="text"/>
5020             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
5021             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
5022             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
5023             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
5024         </fields>
5025         <links>
5026             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5027         </links>
5028         </class>
5029         <class id="acsp" controller="open-ils.cstore" oils_obj:fieldmapper="action::curbside" oils_persist:tablename="action.curbside" reporter:label="Curbside Appointment Slot">
5030                 <fields oils_persist:primary="id" oils_persist:sequence="action.curbside_id_seq">
5031                         <field reporter:label="Appointment ID" name="id" reporter:datatype="id" />
5032                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5033                         <field reporter:label="Pickup Library" name="org" reporter:datatype="org_unit"/>
5034                         <field reporter:label="Appointment Date/Time" name="slot" reporter:datatype="timestamp"/>
5035                         <field reporter:label="Staged" name="staged" reporter:datatype="timestamp"/>
5036                         <field reporter:label="Staging Staff" name="stage_staff" reporter:datatype="link"/>
5037                         <field reporter:label="Arrival Date/Time" name="arrival" reporter:datatype="timestamp"/>
5038                         <field reporter:label="Delivery Date/Time" name="delivered" reporter:datatype="timestamp"/>
5039                         <field reporter:label="Delivery Staff" name="delivery_staff" reporter:datatype="link"/>
5040                         <field reporter:label="Notes" name="notes" reporter:datatype="text"/>
5041                 </fields>
5042                 <links>
5043                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5044                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5045                         <link field="stage_staff" reltype="has_a" key="id" map="" class="au"/>
5046                         <link field="delivery_staff" reltype="has_a" key="id" map="" class="au"/>
5047                 </links>
5048         </class>
5049         <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">
5050                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5051                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5052                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5053                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5054                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
5055                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5056                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5057                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5058                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5059                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5060                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5061                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5062                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5063                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5064                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5065                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5066                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5067                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5068                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5069                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5070                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5071                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5072                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5073                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5074                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5075                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5076                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5077                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5078                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5079                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5080                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5081                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5082                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5083                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5084                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5085                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5086                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5087                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5088                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5089                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5090                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5091                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5092                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5093                 </fields>
5094                 <links>
5095                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5096                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5097                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5098                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5099                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5100                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5101                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5102                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5103                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5104                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5105                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5106                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5107                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5108                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5109                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5110                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5111                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5112                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
5113                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5114                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5115                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5116                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5117                 </links>
5118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5119                         <actions>
5120                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5121                         </actions>
5122                 </permacrud>
5123         </class>
5124         <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">
5125                 <fields>
5126                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
5127                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5128                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
5129                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5130                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
5131                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
5132                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
5133                 </fields>
5134                 <links>
5135                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5136                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5137                 </links>
5138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5139                         <actions>
5140                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5141                         </actions>
5142                 </permacrud>
5143         </class>
5144         <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="false" reporter:label="Combined Aged and Active Circulations (Slim Version)" oils_persist:readonly="true">
5145                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5146                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5147                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5148                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5149                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5150                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5151                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5152                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5153                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5154                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5155                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5156                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5157                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5158                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5159                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5160                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5161                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5162                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5163                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5164                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5165                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5166                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5168                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5169                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5170                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5171                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5172                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5173                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5174                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5175                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5176                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5177                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5178                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5179                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5180                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5181                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5182                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5183                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5184                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5185                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5186                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5187                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5188                 </fields>
5189                 <links>
5190                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5191                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5192                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5193                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5194                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5195                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5196                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5197                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5198                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5199                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5200                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5201                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5202                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5203                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5204                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5205                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5206                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5207                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5208                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5209                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5210                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5211                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5212                 </links>
5213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5214                         <actions>
5215                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5216                         </actions>
5217                 </permacrud>
5218         </class>
5219
5220         <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">
5221                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5222                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5223                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5224                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5225                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5226                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5227                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5228                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5229                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5230                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5231                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5232                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5233                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5234                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5235                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5236                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5237                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5238                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5239                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5240                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5241                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5242                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5243                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5244                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5245                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5246                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5247                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5248                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5249                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5250                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5251                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5252                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5253                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5254                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5255                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5256                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5257                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5258                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5259                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5260                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5261                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5262                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5263                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5264                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5265                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5266                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5267                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5268                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5269                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5270                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5271                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5272                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5273                 </fields>
5274                 <links>
5275                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5276                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5277                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5278                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5279                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5280                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5281                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5282                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5283                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5284                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5285                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5286                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5287                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5288                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5289                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5290                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5291                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5292                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5293                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5294                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5295                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5296                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5297                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5298                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5299                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5300                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5301                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5302                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5303                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5304                 </links>
5305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5306                         <actions>
5307                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5308                         </actions>
5309                 </permacrud>
5310         </class>
5311         <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">
5312                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5313                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5314                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5315                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5316                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5317                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5318                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5319                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5320                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5321                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5322                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5323                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5324                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5325                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5326                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5327                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5328                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5329                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5330                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5331                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5332                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5333                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5334                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5335                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5336                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5337                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5338                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5339                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5340                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5341                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5342                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5343                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5344                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5345                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5346                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5347                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5348                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5349                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5350                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5351                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5352                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5353                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5354                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5355                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5356                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5357                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5358                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5359                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5360                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5361                 </fields>
5362                 <links>
5363                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5364                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5365                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5366                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5367                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5368                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5369                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5370                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5371                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5372                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5373                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5374                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5375                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5376                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5377                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5378                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5379                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5380                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5381                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5382                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5383                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5384                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
5385                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5386                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5387                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5388                 </links>
5389         </class>
5390         <class id="auch" 
5391                 controller="open-ils.cstore" 
5392                 oils_obj:fieldmapper="action::user_circ_history" 
5393                 oils_persist:tablename="action.usr_circ_history" 
5394                 reporter:label="User Checkout History">
5395                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
5396                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5397                         <!-- prevent reporting on the user that owns the checkout history -->
5398                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
5399                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5400                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
5401                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
5402                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
5403                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
5404                 </fields>
5405                 <links>
5406                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5407                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5408                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
5409                 </links>
5410         </class>
5411         <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">
5412                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
5413                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5414                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5415                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5416                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5417                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5418                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5419                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5420                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5421                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5422                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5423                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5424                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5425                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5426                 </fields>
5427                 <links>
5428                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5429                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5430                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5431                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5432                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5433                 </links>
5434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5435                         <actions>
5436                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5437                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5438                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5439                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5440                         </actions>
5441                 </permacrud>
5442         </class>
5443
5444         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5445                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5446                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5447                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5448                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5449                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5450                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5451                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5452                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5453                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5454                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5455                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5456                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5457                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5458                 </fields>
5459                 <links>
5460                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5461                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5462                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5463                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5464                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5465                 </links>
5466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5467                         <actions>
5468                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5469                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5470                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5471                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5472                         </actions>
5473                 </permacrud>
5474         </class>
5475         
5476         <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">
5477                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5478                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5479                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5480                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5481                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5482                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5483                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5484                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5485                 </fields>
5486                 <links>
5487                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5488                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5489                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5490                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5491                 </links>
5492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5493                         <actions>
5494                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5495                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5496                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5497                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5498                         </actions>
5499                 </permacrud>
5500         </class>
5501         
5502         <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">
5503                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5504                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5505                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5506                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5507                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5508                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5509                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5510                 </fields>
5511                 <links>
5512                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5513                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5514                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5515                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5516                 </links>
5517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5518                         <actions>
5519                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5520                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5521                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5522                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5523                         </actions>
5524                 </permacrud>
5525         </class>
5526         
5527         <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">
5528                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5529                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5530                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5531                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5532                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5533                 </fields>
5534                 <links>
5535                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5536                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5537                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5538                 </links>
5539                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5540                         <actions>
5541                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5542                     <context link="resource" field="owner" />
5543                 </create>
5544                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5545                     <context link="resource" field="owner" />
5546                 </retrieve>
5547                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5548                     <context link="resource" field="owner" />
5549                 </update>
5550                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5551                     <context link="resource" field="owner" />
5552                 </delete>
5553                         </actions>
5554                 </permacrud>
5555         </class>
5556         
5557         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5558                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5559                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5560                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5561                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5562                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5563                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5564                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5565                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5566                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5567                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5568                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5569                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5570                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5571                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5572                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5573                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5574                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5575                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5576                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5577                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5578                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5579                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5580                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5581                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5582                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5583                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5584                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5585                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5586                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5587                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5588                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5589                 </fields>
5590                 <links>
5591                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5592                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5593                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5594                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5595                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5596                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5597                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5598                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5599                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5600                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5601                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5602                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5603                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5604                 </links>
5605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5606                         <actions>
5607                                 <create permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5608                                 <retrieve permission="VIEW_BOOKING_RESERVATION" context_field="pickup_lib"/>
5609                                 <update permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5610                                 <delete permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5611                         </actions>
5612                 </permacrud>
5613         </class>
5614         
5615         <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">
5616                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5617                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5618                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5619                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5620                 </fields>
5621                 <links>
5622                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5623                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5624                 </links>
5625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5626                         <actions>
5627                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5628                                         <context link="reservation" field="pickup_lib"/>
5629                                 </create>
5630                                 <retrieve permission="VIEW_BOOKING_RESERVATION_ATTR_MAP">
5631                                         <context link="reservation" field="pickup_lib"/>
5632                                 </retrieve>
5633                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5634                                         <context link="reservation" field="pickup_lib"/>
5635                                 </update>
5636                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5637                                         <context link="reservation" field="pickup_lib"/>
5638                                 </delete>
5639                         </actions>
5640                 </permacrud>
5641         </class>
5642
5643         <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">
5644                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5645                         <field name="bucket" reporter:datatype="link"/>
5646                         <field name="id" reporter:datatype="id" />
5647                         <field name="target_call_number" reporter:datatype="link" />
5648                         <field name="create_time" reporter:datatype="timestamp" />
5649                         <field name="pos" reporter:datatype="int" />
5650                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5651                 </fields>
5652                 <links>
5653                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5654                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5655             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5656                 </links>
5657                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5658                         <actions>
5659                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5660                     <context link="bucket" owning_lib="owning_lib"/>
5661                 </retrieve>
5662             </actions>
5663         </permacrud>
5664         </class>
5665         <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">
5666                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5667                         <field name="id" reporter:datatype="id" />
5668                         <field name="item" reporter:datatype="link"/>
5669                         <field name="note" reporter:datatype="text" />
5670                 </fields>
5671                 <links>
5672                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5673                 </links>
5674         </class>
5675         <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">
5676                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5677                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5678                         <field name="btype" reporter:datatype="text"/>
5679                         <field name="id" reporter:datatype="id" />
5680                         <field name="name" reporter:datatype="text"/>
5681                         <field name="description" reporter:datatype="text"/>
5682                         <field name="owner" reporter:datatype="link"/>
5683                         <field name="pub" reporter:datatype="bool"/>
5684                         <field name="create_time" reporter:datatype="timestamp" />
5685                         <field name="owning_lib" reporter:datatype="org_unit" />
5686                 </fields>
5687                 <links>
5688                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5689                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5690                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5691                 </links>
5692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5693                         <actions>
5694                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5695                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5696                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5697                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5698                         </actions>
5699                 </permacrud>
5700         </class>
5701         <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">
5702                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5703                         <field name="id" reporter:datatype="id" />
5704                         <field name="bucket" reporter:datatype="link"/>
5705                         <field name="note" reporter:datatype="text" />
5706                 </fields>
5707                 <links>
5708                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5709                 </links>
5710         </class>
5711         <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">
5712                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5713                         <field name="hold" reporter:datatype="link"/>
5714                         <field name="id" reporter:datatype="id" />
5715                         <field name="target_copy" reporter:datatype="link"/>
5716                         <field name="proximity" reporter:datatype="number"/>
5717                 </fields>
5718                 <links>
5719                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5720                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5721                 </links>
5722         </class>
5723         <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">
5724                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5725                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5726                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5727                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5728                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5729                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5730                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5731                 </fields>
5732                 <links>
5733                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5734                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5735                 </links>
5736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5737             <actions>
5738                 <create permission="CREATE_HOLD_NOTIFICATION">
5739                                         <context link="hold" jump="usr" field="home_ou" />
5740                                 </create>
5741                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5742                                         <context link="hold" jump="usr" field="home_ou" />
5743                                 </retrieve>
5744                 <update permission="CREATE_HOLD_NOTIFICATION">
5745                                         <context link="hold" jump="usr" field="home_ou" />
5746                                 </update>
5747                 <delete permission="CREATE_HOLD_NOTIFICATION">
5748                                         <context link="hold" jump="usr" field="home_ou" />
5749                                 </delete>
5750             </actions>
5751         </permacrud>
5752         </class>
5753         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Shelving Location"  oils_persist:field_safe="true">
5754                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5755                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5756                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5757                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5758                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5759                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5760                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5761                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5762                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5763                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5764                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5765                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5766                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5767                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5768                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5769                 </fields>
5770                 <links>
5771                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5772                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5773                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5774                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5775                 </links>
5776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5777             <actions>
5778                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5779                 <retrieve/>
5780                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5781                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5782             </actions>
5783         </permacrud>
5784         </class>
5785         <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">
5786                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5787                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5788                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5789                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5790                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" />
5791             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5792             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5793             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5794                 </fields>
5795                 <links>
5796                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5797                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5798                 </links>
5799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5800             <actions>
5801                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5802                 <retrieve/>
5803                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5804                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5805             </actions>
5806         </permacrud>
5807         </class>
5808         <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">
5809                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5810                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5811             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5812             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5813                 </fields>
5814                 <links>
5815                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5816                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5817                 </links>
5818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5819             <actions>
5820                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5821                                         <context link="lgroup" field="owner" />
5822                 </create>
5823                 <retrieve/>
5824                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5825                                         <context link="lgroup" field="owner" />
5826                 </update>
5827                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5828                                         <context link="lgroup" field="owner" />
5829                 </delete>
5830             </actions>
5831         </permacrud>
5832         </class>
5833
5834     <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">
5835         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5836             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5837             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5838             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5839             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5840         </fields>
5841         <links>
5842             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5843             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5844         </links>
5845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5846             <actions>
5847                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5848                 <retrieve/>
5849                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5850                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5851             </actions>
5852         </permacrud>
5853     </class>
5854
5855         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5856                 <fields>
5857                         <field name="sre_id" oils_persist:virtual="true" />
5858                         <field name="location" oils_persist:virtual="true" />
5859                         <field name="owning_lib" oils_persist:virtual="true" />
5860                         <field name="basic_holdings" oils_persist:virtual="true" />
5861                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5862                         <field name="supplement_holdings" oils_persist:virtual="true" />
5863                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5864                         <field name="index_holdings" oils_persist:virtual="true" />
5865                         <field name="index_holdings_add" oils_persist:virtual="true" />
5866                         <field name="online" oils_persist:virtual="true" />
5867                         <field name="missing" oils_persist:virtual="true" />
5868                         <field name="incomplete" oils_persist:virtual="true" />
5869                 </fields>
5870         </class>
5871
5872         <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">
5873                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5874                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5875                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5876                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5877                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5878                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5879                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5880                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5881                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5882                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5883                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5884                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5885                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5886                 </fields>
5887                 <links>
5888                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5889                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5890                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5891                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5892                 </links>
5893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5894                         <actions>
5895                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5896                                 <retrieve/>
5897                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5898                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5899                         </actions>
5900                 </permacrud>
5901         </class>
5902
5903         <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">
5904                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5905                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5906                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5907                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5908                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5909                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5910                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5911                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5912                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5913                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5914                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5915                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5916                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5917                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5918                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5919                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5920                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5921                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5922                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5923                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5924                 </fields>
5925                 <links>
5926                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5927                 </links>
5928                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5929                         <actions>
5930                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5931                                         <context link="subscription" field="owning_lib" />
5932                                 </create>
5933                                 <retrieve />
5934                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5935                                         <context link="subscription" field="owning_lib" />
5936                                 </update>
5937                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5938                                         <context link="subscription" field="owning_lib" />
5939                                 </delete>
5940                         </actions>
5941                 </permacrud>
5942         </class>
5943
5944         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5945                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5946                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5947                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5948                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5949                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5950                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5951                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5952                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5953                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5954                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5955                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5956                 </fields>
5957                 <links>
5958                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5959                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5960                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5961                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5962                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5963                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5964                 </links>
5965                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5966                         <actions>
5967                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5968                                 <retrieve />
5969                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5970                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5971                         </actions>
5972                 </permacrud>
5973         </class>
5974
5975         <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">
5976                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5977                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5978                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5979                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5980                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5981                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5982                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5983                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5984                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5985                 </fields>
5986                 <links>
5987                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5988                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5989                 </links>
5990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5991                         <actions>
5992                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5993                     <context link="subscription" field="owning_lib"/>
5994                 </create>
5995                                 <retrieve />
5996                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5997                     <context link="subscription" field="owning_lib"/>
5998                 </update>
5999                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
6000                     <context link="subscription" field="owning_lib"/>
6001                 </delete>
6002                         </actions>
6003                 </permacrud>
6004         </class>
6005
6006         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
6007                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
6008                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6009                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
6010                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
6011                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6012                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
6013                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6014                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
6015                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
6016                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
6017                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
6018                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
6019                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
6020                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
6021                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
6022                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6023                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6024                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6025                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
6026                 </fields>
6027                 <links>
6028                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
6029                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6030                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
6031                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
6032                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
6033                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
6034                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
6035                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
6036                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
6037                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
6038                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
6039                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
6040                 </links>
6041                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6042                         <actions>
6043                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6044                                 <retrieve />
6045                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6046                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
6047                         </actions>
6048                 </permacrud>
6049         </class>
6050
6051         <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">
6052                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
6053                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6054                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6055                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6056                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6057                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6058                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6059                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6060                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6061                 </fields>
6062                 <links>
6063                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6064                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6065                 </links>
6066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6067                         <actions>
6068                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6069                                         <context link="distribution" field="holding_lib" />
6070                                 </create>
6071                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
6072                                         <context link="distribution" field="holding_lib" />
6073                                 </retrieve>
6074                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6075                                         <context link="distribution" field="holding_lib" />
6076                                 </update>
6077                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6078                                         <context link="distribution" field="holding_lib" />
6079                                 </delete>
6080                         </actions>
6081                 </permacrud>
6082         </class>
6083
6084         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
6085                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
6086                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6087                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6088                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
6089                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6090                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
6091                 </fields>
6092                 <links>
6093                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6094                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
6095                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
6096                 </links>
6097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6098                         <actions>
6099                                 <create permission="ADMIN_SERIAL_STREAM">
6100                                         <context link="distribution" field="holding_lib" />
6101                                 </create>
6102                                 <retrieve />
6103                                 <update permission="ADMIN_SERIAL_STREAM">
6104                                         <context link="distribution" field="holding_lib" />
6105                                 </update>
6106                                 <delete permission="ADMIN_SERIAL_STREAM">
6107                                         <context link="distribution" field="holding_lib" />
6108                                 </delete>
6109                         </actions>
6110                 </permacrud>
6111         </class>
6112
6113         <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">
6114                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
6115                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6116                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6117                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
6118                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
6119                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
6120                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6121                 </fields>
6122                 <links>
6123                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6124                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
6125                 </links>
6126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6127                         <actions>
6128                                 <create permission="ADMIN_SERIAL_STREAM">
6129                                         <context link="stream" jump="distribution" field="holding_lib" />
6130                                 </create>
6131                                 <retrieve permission="RECEIVE_SERIAL">
6132                                         <context link="stream" jump="distribution" field="holding_lib" />
6133                                 </retrieve>
6134                                 <update permission="ADMIN_SERIAL_STREAM">
6135                                         <context link="stream" jump="distribution" field="holding_lib" />
6136                                 </update>
6137                                 <delete permission="ADMIN_SERIAL_STREAM">
6138                                         <context link="stream" jump="distribution" field="holding_lib" />
6139                                 </delete>
6140                         </actions>
6141                 </permacrud>
6142         </class>
6143
6144         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
6145                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
6146                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6147                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6148                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6149                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6150                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6151                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6152                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
6153                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6154                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
6155                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
6156                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
6157                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
6158                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6159                 </fields>
6160                 <links>
6161                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6162                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6163                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6164                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
6165                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
6166                 </links>
6167                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6168                         <actions>
6169                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
6170                                         <context link="subscription" field="owning_lib" />
6171                                 </create>
6172                                 <retrieve/>
6173                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
6174                                         <context link="subscription" field="owning_lib" />
6175                                 </update>
6176                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
6177                                         <context link="subscription" field="owning_lib" />
6178                                 </delete>
6179                         </actions>
6180                 </permacrud>
6181         </class>
6182
6183         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
6184                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6185                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6186                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6187                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6188                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6189                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6190                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6191                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6192                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6193                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6194                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6195                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6196                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6197                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6198                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6199                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6200                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6201                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6202                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6203                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6204                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6205                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6206                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6207                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6208                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6209                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6210                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6211                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6212                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6213                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6214                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6215                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6216                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6217                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6218                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
6219                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
6220                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
6221                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6222                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6223                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6224                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6225                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6226                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6227                 </fields>
6228                 <links>
6229                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6230                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6231                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6232                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6233                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6234                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6235                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6236                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6237                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6238                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6239                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6240                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6241                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6242                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6243                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6244                 </links>
6245                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6246                         <actions>
6247                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6248                                 <retrieve/>
6249                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6250                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6251                         </actions>
6252                 </permacrud>
6253         </class>
6254
6255         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
6256                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
6257                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6258                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6259                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6260                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6261                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6262                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
6263                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6264                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
6265                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
6266                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
6267                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
6268                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
6269                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6270                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
6271                 </fields>
6272                 <links>
6273                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6274                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6275                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6276                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6277                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
6278                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
6279                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
6280                 </links>
6281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6282                         <actions>
6283                                 <create permission="ADMIN_SERIAL_ITEM">
6284                                         <context link="stream" jump="distribution" field="holding_lib" />
6285                                 </create>
6286                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6287                                         <context link="stream" jump="distribution" field="holding_lib" />
6288                                 </retrieve>
6289                                 <update permission="ADMIN_SERIAL_ITEM">
6290                                         <context link="stream" jump="distribution" field="holding_lib" />
6291                                 </update>
6292                                 <delete permission="ADMIN_SERIAL_ITEM">
6293                                         <context link="stream" jump="distribution" field="holding_lib" />
6294                                 </delete>
6295                         </actions>
6296                 </permacrud>
6297         </class>
6298
6299         <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">
6300                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
6301                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6302                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
6303                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6304                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6305                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6306                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6307                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6308                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6309                 </fields>
6310                 <links>
6311                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
6312                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6313                 </links>
6314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6315                         <actions>
6316                                 <create permission="ADMIN_SERIAL_ITEM">
6317                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6318                                 </create>
6319                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6320                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6321                                 </retrieve>
6322                                 <update permission="ADMIN_SERIAL_ITEM">
6323                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6324                                 </update>
6325                                 <delete permission="ADMIN_SERIAL_ITEM">
6326                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6327                                 </delete>
6328                         </actions>
6329                 </permacrud>
6330         </class>
6331         <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">
6332                 <fields>
6333                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
6334                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
6335                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
6336                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
6337                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
6338                 </fields>
6339                 <links>
6340                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6341                 </links>
6342         </class>
6343         <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">
6344                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
6345                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6346                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
6347                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
6348                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
6349                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
6350                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
6351                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
6352                 </fields>
6353                 <links>
6354                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6355                 </links>
6356         </class>
6357         <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">
6358                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
6359                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6360                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6361                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6362                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6363                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6364                 </fields>
6365                 <links>
6366                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6367                 </links>
6368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6369                         <actions>
6370                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6371                                         <context link="distribution" field="holding_lib" />
6372                                 </create>
6373                                 <retrieve/>
6374                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6375                                         <context link="distribution" field="holding_lib" />
6376                                 </update>
6377                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6378                                         <context link="distribution" field="holding_lib" />
6379                                 </delete>
6380                         </actions>
6381                 </permacrud>
6382         </class>
6383
6384         <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">
6385                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
6386                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6387                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6388                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6389                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6390                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6391                 </fields>
6392                 <links>
6393                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6394                 </links>
6395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6396                         <actions>
6397                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6398                                         <context link="distribution" field="holding_lib" />
6399                                 </create>
6400                                 <retrieve/>
6401                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6402                                         <context link="distribution" field="holding_lib" />
6403                                 </update>
6404                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6405                                         <context link="distribution" field="holding_lib" />
6406                                 </delete>
6407                         </actions>
6408                 </permacrud>
6409         </class>
6410
6411         <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">
6412                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
6413                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6414                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6415                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6416                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6417                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6418                 </fields>
6419                 <links>
6420                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6421                 </links>
6422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6423                         <actions>
6424                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6425                                         <context link="distribution" field="holding_lib" />
6426                                 </create>
6427                                 <retrieve/>
6428                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6429                                         <context link="distribution" field="holding_lib" />
6430                                 </update>
6431                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6432                                         <context link="distribution" field="holding_lib" />
6433                                 </delete>
6434                         </actions>
6435                 </permacrud>
6436         </class>
6437
6438         <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">
6439                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6440                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6441                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6442                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6443                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6444                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6445                 </fields>
6446                 <links>
6447                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6448                 </links>
6449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6450                         <actions>
6451                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6452                                 <retrieve/>
6453                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6454                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6455                         </actions>
6456                 </permacrud>
6457         </class>
6458
6459         <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">
6460                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6461                         <field name="id" reporter:datatype="id" />
6462                         <field name="owning_copy" reporter:datatype="link"/>
6463                         <field name="stat_cat" reporter:datatype="link"/>
6464                         <field name="stat_cat_entry" reporter:datatype="link"/>
6465                 </fields>
6466                 <links>
6467                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6468                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6469                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6470                 </links>
6471                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6472                         <actions>
6473                                 <retrieve/>
6474                         </actions>
6475                 </permacrud>
6476         </class>
6477         <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">
6478                 <fields oils_persist:primary="code">
6479                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6480                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6481                 </fields>
6482                 <links/>
6483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6484             <actions>
6485                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6486                 <retrieve/>
6487                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6488                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6489             </actions>
6490         </permacrud>
6491         </class>
6492         <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">
6493                 <fields oils_persist:primary="code">
6494                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6495                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6496                 </fields>
6497                 <links/>
6498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6499             <actions>
6500                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6501                 <retrieve/>
6502                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6503                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6504             </actions>
6505         </permacrud>
6506         </class>
6507         <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">
6508                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6509                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6510                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6511                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6512                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6513                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6514                 </fields>
6515                 <links>
6516             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6517         </links>
6518         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6519             <actions>
6520                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6521                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6522                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6523                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6524             </actions>
6525         </permacrud>
6526         </class>
6527         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Library Group">
6528                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6529                         <field reporter:label="Library Group ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6530                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6531                         <field reporter:label="Global?" name="global" reporter:datatype="bool"/>
6532                         <field reporter:label="Maps" name="maps" oils_persist:virtual="true" reporter:datatype="link"/>
6533                 </fields>
6534                 <links>
6535                         <link field="maps" reltype="has_many" key="lasso" map="" class="lmap"/>
6536         </links>
6537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6538             <actions>
6539                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6540                 <retrieve/>
6541                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6542                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6543             </actions>
6544         </permacrud>
6545         </class>
6546         <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="Library Group Map">
6547                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6548                         <field reporter:label="Library Group Map ID" name="id" reporter:datatype="id" />
6549                         <field reporter:label="Library Group" name="lasso" reporter:datatype="link"/>
6550                         <field reporter:label="Organizational Unit" name="org_unit" reporter:datatype="org_unit"/>
6551                 </fields>
6552                 <links>
6553                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6554                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6555                 </links>
6556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6557             <actions>
6558                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6559                 <retrieve/>
6560                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6561                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6562             </actions>
6563         </permacrud>
6564         </class>
6565         <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">
6566                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6567                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6568                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6569                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6570                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6571                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6572                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6573                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6574                         <field name="pos" reporter:label="Position" reporter:datatype="int" oils_obj:required="true" />
6575                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6576                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6577                 </fields>
6578                 <links>
6579                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6580                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6581                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6582                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6583                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6584                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6585                 </links>
6586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6587             <actions>
6588                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6589                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6590                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6591                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6592             </actions>
6593         </permacrud>
6594         </class>
6595         <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">
6596                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6597                         <field name="id" reporter:datatype="id" />
6598                         <field name="from_org" reporter:datatype="org_unit"/>
6599                         <field name="to_org" reporter:datatype="org_unit"/>
6600                         <field name="prox" reporter:datatype="int" />
6601                 </fields>
6602                 <links>
6603                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6604                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6605                 </links>
6606         </class>
6607         <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">
6608                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6609                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6610                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6611                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6612                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6613                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6614                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6615                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6616                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6617                 </fields>
6618                 <links/>
6619         </class>
6620         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6621                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6622                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6623                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6624                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6625                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6626                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6627                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6628                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6629                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6630                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6631                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6632                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6633                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6634                 </fields>
6635                 <links>
6636                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6637                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6638                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6639                 </links>
6640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6641             <actions>
6642                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6643                 <retrieve/>
6644                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6645                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6646             </actions>
6647         </permacrud>
6648         </class>
6649         <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">
6650                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6651                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6652                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6653                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6654                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6655                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6656                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6657                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6658                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6659                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6660                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6661                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6662                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6663                         <field name="latitude" reporter:label="Latitude" reporter:datatype="float"/>
6664                         <field name="longitude" reporter:label="Longitude" reporter:datatype="float"/>
6665                 </fields>
6666                 <links>
6667                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6668                 </links>
6669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6670             <actions>
6671                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6672                 <retrieve/>
6673                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6674                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6675             </actions>
6676         </permacrud>
6677         </class>
6678         <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">
6679                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6680                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6681                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6682                         <field name="query_text" reporter:datatype="text"/>
6683                 </fields>
6684         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6685             <actions>
6686                 <retrieve/>
6687             </actions>
6688         </permacrud>
6689         </class>
6690
6691         <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">
6692                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6693                         <field name="id" reporter:datatype="id" reporter:selector="label" reporter:label="ID" oils_obj:required="true"/>
6694                         <field name="owner" reporter:datatype="org_unit" reporter:label="Owning Org Unit" oils_obj:required="true"/>
6695                         <field name="code" reporter:datatype="text" reporter:label="Code" oils_obj:required="true"/>
6696                         <field name="label" reporter:datatype="text" oils_persist:i18n="true" reporter:label="Label" oils_obj:required="true"/>
6697                         <field name="create_date" reporter:datatype="timestamp" reporter:label="Create Date"/>
6698                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link" reporter:label="Group Entries"/>
6699                 </fields>
6700                 <links>
6701                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6702                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6703                 </links>
6704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6705             <actions>
6706                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6707                 <retrieve/>
6708                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6709                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6710             </actions>
6711         </permacrud>
6712         </class>
6713         <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">
6714                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6715                         <field name="id" reporter:datatype="id" reporter:label="ID" oils_obj:required="true"/>
6716                         <field name="grp" reporter:datatype="link" reporter:label="Search Filter Group" oils_obj:required="true"/>
6717                         <field name="pos" reporter:datatype="int" reporter:label="Position" oils_obj:required="true"/>
6718                         <field name="query" reporter:datatype="link" reporter:label="Query" oils_obj:required="true"/>
6719                 </fields>
6720                 <links>
6721                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6722                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6723                 </links>
6724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6725             <actions>
6726                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6727                     <context link="grp" field="owner"/>
6728                 </create>
6729                 <retrieve/>
6730                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6731                     <context link="grp" field="owner"/>
6732                 </update>
6733                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6734                     <context link="grp" field="owner"/>
6735                 </delete>
6736             </actions>
6737         </permacrud>
6738         </class>
6739
6740         <!-- A note: Please update alhr and ahopl when updating ahr -->
6741         <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">
6742                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6743                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6744                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6745                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6746                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6747                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6748                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6749                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6750                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6751                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6752                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6753                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6754                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6755                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6756                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6757                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6758                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6759                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6760                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6761                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6762                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6763                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6764                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6765                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6766                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6767                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6768                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6769                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6770                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6771                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6772                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6774                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6775                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6776                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6777                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6778                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6779                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6780                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6781                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6782                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6783                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6784                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6785                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6786                 </fields>
6787                 <links>
6788                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6789                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6790                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6791                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6792                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6793                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6794                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6795                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6796                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6797                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6798                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6799                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6800                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6801                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6802                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6803                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6804                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6805                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6806                 </links>
6807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6808                         <actions>
6809                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6810                         </actions>
6811                 </permacrud>
6812         </class>
6813         <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">
6814                 <oils_persist:source_definition><![CDATA[
6815                 SELECT
6816                         ahr.*,
6817                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6818                                 copy_location_order_position,
6819                         CASE WHEN au.alias IS NOT NULL THEN
6820                                 au.alias
6821                         ELSE
6822                                 au.first_given_name
6823                         END AS usr_alias_or_first_given_name,
6824                         au.first_given_name AS usr_first_given_name,
6825                         au.second_given_name AS usr_second_given_name,
6826                         au.family_name AS usr_family_name,
6827                         au.prefix AS usr_prefix,
6828                         au.suffix AS usr_suffix,
6829                         au.alias AS usr_alias,
6830                         CASE WHEN au.alias IS NOT NULL THEN
6831                                 au.alias
6832                         ELSE
6833                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6834                                         COALESCE(au.family_name, ''),
6835                                         COALESCE(au.suffix, ''),
6836                                         ', ',
6837                                         COALESCE(au.prefix, ''),
6838                                         COALESCE(au.first_given_name, ''),
6839                                         COALESCE(au.second_given_name, '')
6840                                 ], ' '), E'\\s+,', ',')
6841                         END AS usr_alias_or_display_name,
6842                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6843                                 COALESCE(au.family_name, ''),
6844                                 COALESCE(au.suffix, ''),
6845                                 ', ',
6846                                 COALESCE(au.prefix, ''),
6847                                 COALESCE(au.first_given_name, ''),
6848                                 COALESCE(au.second_given_name, '')
6849                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6850                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6851                                 AS call_number_label,
6852                         siss.label AS issuance_label,
6853                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6854                         ahcm_1.copy_count AS potential_copies
6855                 FROM action.hold_request ahr
6856                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6857                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6858                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6859                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6860                 JOIN actor.usr au ON (au.id = ahr.usr)
6861                 JOIN (
6862                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6863                         FROM asset.copy_location
6864                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6865                 LEFT JOIN actor.usr_standing_penalty ausp 
6866                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6867                 LEFT JOIN config.standing_penalty csp
6868                         ON (
6869                                 csp.id = ausp.standing_penalty AND 
6870                                 csp.block_list LIKE '%CAPTURE%' AND (
6871                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6872                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6873                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6874                                         )
6875                                 )
6876                         )
6877                 JOIN (
6878                         SELECT COUNT(target_copy) AS copy_count, hold
6879                         FROM action.hold_copy_map
6880                         GROUP BY 2
6881                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6882                 LEFT JOIN serial.issuance siss
6883                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6884                 LEFT JOIN asset.copy_location_order acplo
6885                         ON (acp.location = acplo.location AND
6886                                 acp.circ_lib = acplo.org)
6887                 WHERE
6888                         ahr.capture_time IS NULL AND
6889                         ahr.cancel_time IS NULL AND
6890                         csp.id IS NULL AND
6891                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6892                         acp.status IN (0,7)
6893                 ]]></oils_persist:source_definition>
6894                 <fields oils_persist:primary="id">
6895                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6896                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6897                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6898                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6899                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6900                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6901                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6902                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6903                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6904                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6905                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6906                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6907                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6908                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6909                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6910                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6911                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6912                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6913                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6914                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6915                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6916                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6917                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6918                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6919                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6920                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6921                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6922                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6923                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6924                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6925                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6926                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6927                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6928                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6929                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6930                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6931                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6932                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6933                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6934                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6935                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6936                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6937                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6938                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6939                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6940                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6941                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6942                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6943                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6944                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6945                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6946                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6947                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6948                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6949                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6950                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6951                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6952                 </fields>
6953                 <links>
6954                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6955                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6956                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6957                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6958                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6959                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6960                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6961                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6962                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6963                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6964                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6965                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6966                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6967                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6968                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6969                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6970                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6971                 </links>
6972                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6973                         <actions>
6974                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6975                         </actions>
6976                 </permacrud>
6977         </class>
6978         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6979                 <oils_persist:source_definition><![CDATA[
6980                         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)
6981                 ]]></oils_persist:source_definition>
6982                 <fields oils_persist:primary="id">
6983                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6984                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6985                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6986                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6987                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6988                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6989                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6990                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6991                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6992                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6993                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6994                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6995                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6996                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6997                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6998                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6999                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7000                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
7001                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7002                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7003                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7004                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
7005                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7006                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
7007                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
7008                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
7009                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7010                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
7011                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7012                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7013                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7014                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7015                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7016                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7017                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7018                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7019                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
7020                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7021                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
7022                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
7023                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
7024                 </fields>
7025                 <links>
7026                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7027                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7028                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7029                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7030                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
7031                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7032                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7033                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7034                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
7035                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
7036                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
7037                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7038                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7039                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
7040                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7041                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
7042                 </links>
7043         </class>
7044
7045         <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">
7046                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
7047                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7048                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7049                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7050                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
7051                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
7052                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
7053                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
7054                 </fields>
7055                 <links>
7056                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7057                 </links>
7058                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7059                         <actions>
7060                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
7061                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
7062                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
7063                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
7064                         </actions>
7065                 </permacrud>
7066         </class>
7067         <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">
7068                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
7069                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
7070                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
7071                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
7072                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
7073                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
7074                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
7075                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7076                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7077                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7078                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7079                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7080                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7081                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7082                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7083                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7084                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7085                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7086                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7087                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7088                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7089                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7090                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7091                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7092                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7093                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7094                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7095                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7096                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7097                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7098                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7099                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7100                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7101                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7102                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7103                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7104                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7105                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
7106                 </fields>
7107                 <links>
7108                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7109                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7110                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7111                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7112                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7113                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7114                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7115                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7116                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7117                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7118                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7119                 </links>
7120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7121                         <actions>
7122                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7123                         </actions>
7124                 </permacrud>
7125         </class>
7126         <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">
7127                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
7128                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
7129                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
7130                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
7131                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
7132                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
7133                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
7134                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7135                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7136                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7137                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7138                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7139                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7140                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7141                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7142                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7143                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7144                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7145                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7146                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7147                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7148                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7149                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7150                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7151                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7152                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7153                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7154                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7155                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7156                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7157                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7158                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7159                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7160                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7161                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7162                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7163                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7164                 </fields>
7165                 <links>
7166                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7167                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7168                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7169                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7170                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7171                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7172                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7173                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7174                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7175                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7176                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7177                 </links>
7178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7179                         <actions>
7180                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7181                         </actions>
7182                 </permacrud>
7183         </class>
7184
7185         <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">
7186                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
7187                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
7188                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
7189                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
7190                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
7191                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
7192                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
7193                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
7194                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
7195                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
7196                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
7197                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7198                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
7199                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7200                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
7201                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
7202                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
7203                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7204                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
7205                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
7206                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
7207                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
7210                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
7211                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
7212                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
7213                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
7214                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
7215                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
7216                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
7217                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
7218                 </fields>
7219                 <links>
7220                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
7221                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
7222                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
7223                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
7224                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
7225                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
7226                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7227                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
7228                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
7229                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
7230                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
7231                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
7232                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
7233                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
7234                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
7235                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
7236                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
7237                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
7238                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
7239                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
7240                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
7241                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
7242                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
7243                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
7244                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
7245                 </links>
7246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7247             <actions>
7248                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
7249                 <retrieve />
7250                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
7251                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
7252             </actions>
7253         </permacrud>
7254         </class>
7255         <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">
7256                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
7257                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7258                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
7259                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
7260                 </fields>
7261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7262                         <actions>
7263                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7264                                 <retrieve/>
7265                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7266                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7267                         </actions>
7268                 </permacrud>
7269         </class>
7270         <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">
7271                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
7272                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7273                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
7274                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
7275                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
7276                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
7277                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
7278                 </fields>
7279                 <links>
7280                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
7281                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7282                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
7283                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
7284                 </links>
7285                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7286                         <actions>
7287                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7288                                 <retrieve/>
7289                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7290                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7291                         </actions>
7292                 </permacrud>
7293         </class>
7294         <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">
7295                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
7296                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7297                         <field name="btype" reporter:datatype="text"/>
7298                         <field name="id" reporter:datatype="id" />
7299                         <field name="name"  reporter:datatype="text"/>
7300                         <field name="description" reporter:datatype="text"/>
7301                         <field name="owner" reporter:datatype="link"/>
7302                         <field name="pub" reporter:datatype="bool"/>
7303                         <field name="create_time" reporter:datatype="timestamp" />
7304                         <field name="owning_lib" reporter:datatype="org_unit" />
7305                 </fields>
7306                 <links>
7307                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7308                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7309                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
7310                 </links>
7311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7312                         <actions>
7313                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7314                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7315                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7316                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7317                         </actions>
7318                 </permacrud>
7319         </class>
7320         <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">
7321                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
7322                         <field name="id" reporter:datatype="id" />
7323                         <field name="bucket" reporter:datatype="link"/>
7324                         <field name="note" reporter:datatype="text" />
7325                 </fields>
7326                 <links>
7327                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
7328                 </links>
7329         </class>
7330         <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">
7331                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
7332                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7333                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7334                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7335                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7336                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7337                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7338                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7339                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7340                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7341                 </fields>
7342                 <links>
7343                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7344                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
7345                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
7346                 </links>
7347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7348                         <actions>
7349                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7350                         </actions>
7351                 </permacrud>
7352         </class>
7353         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
7354                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
7355                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
7356                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7357                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
7358                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7359                 </fields>
7360                 <links>
7361                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7362                 </links>
7363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7364                         <actions>
7365                                 <retrieve permission="VIEW_USER user_request.view">
7366                                         <context link="usr" field="home_ou" />
7367                                 </retrieve>
7368                         </actions>
7369                 </permacrud>
7370         </class>
7371     <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">
7372         <fields oils_persist:primary="field">
7373             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7374             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7375             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7376         </fields>
7377         <links/>
7378         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7379             <actions>
7380                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
7381                 <retrieve />
7382                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
7383                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
7384             </actions>
7385         </permacrud>
7386     </class>
7387         <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">
7388                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
7389                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7390                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7391                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7392                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7393                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7394                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7395                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
7396                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7397                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7398                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7399                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7400                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
7401                 </fields>
7402                 <links>
7403                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7404                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
7405                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
7406                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
7407                 </links>
7408         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7409             <actions>
7410                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
7411                 <retrieve />
7412                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
7413                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
7414             </actions>
7415         </permacrud>
7416         </class>
7417         <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">
7418                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
7419                         <field name="field" reporter:datatype="link"/>
7420                         <field name="id" reporter:datatype="id" />
7421                         <field name="source" reporter:datatype="link"/>
7422                         <field name="value"  reporter:datatype="text"/>
7423                 </fields>
7424                 <links>
7425                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7426                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7427                 </links>
7428         </class>
7429         <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">
7430                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
7431                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7432                         <field name="btype" reporter:datatype="text"/>
7433                         <field name="id" reporter:datatype="id" />
7434                         <field name="name"  reporter:datatype="text"/>
7435                         <field name="description" reporter:datatype="text"/>
7436                         <field name="owner" reporter:datatype="link"/>
7437                         <field name="pub" reporter:datatype="bool"/>
7438                         <field name="create_time" reporter:datatype="timestamp" />
7439                         <field name="owning_lib" reporter:datatype="org_unit" />
7440                 </fields>
7441                 <links>
7442                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7443                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7444                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7445                 </links>
7446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7447                         <actions>
7448                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7449                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7450                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7451                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7452                         </actions>
7453                 </permacrud>
7454         </class>
7455         <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">
7456                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7457                         <field name="id" reporter:datatype="id" />
7458                         <field name="bucket" reporter:datatype="link"/>
7459                         <field name="note" reporter:datatype="text" />
7460                 </fields>
7461                 <links>
7462                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7463                 </links>
7464         </class>
7465         <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">
7466                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7467                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7468                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7469                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7470                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7471                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7472                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7473                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7474                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7475                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7476                 </fields>
7477                 <links>
7478                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7479                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7480                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7481                 </links>
7482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7483             <actions>
7484                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7485                     <context link="xact" jump="usr" field="home_ou"/>
7486                 </retrieve>
7487                         </actions>
7488                 </permacrud>
7489         </class>
7490         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7491                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7492                         <field name="id" reporter:datatype="id" />
7493                         <field name="ind1" />
7494                         <field name="ind2" />
7495                         <field name="record" />
7496                         <field name="subfield" />
7497                         <field name="tag" />
7498                         <field name="value" />
7499                 </fields>
7500                 <links>
7501                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7502                 </links>
7503         </class>
7504         <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">
7505                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7506                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7507                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7508                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7509                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7510                 </fields>
7511                 <links>
7512                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7513                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7514                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7515                 </links>
7516         </class>
7517         <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">
7518                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7519                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7520                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7521                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7522                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7523                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7524                 </fields>
7525                 <links>
7526                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7527                 </links>
7528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7529             <actions>
7530                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7531                 <retrieve/>
7532                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7533                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7534             </actions>
7535         </permacrud>
7536
7537         </class>
7538         <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">
7539                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7540                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7541                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7542                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7543                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7544                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7545                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7546                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7547                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7548                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7549                 </fields>
7550                 <links>
7551                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7552                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7553                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7554                 </links>
7555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7556             <actions>
7557                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7558                 <retrieve/>
7559                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7560                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7561             </actions>
7562         </permacrud>
7563         </class>
7564         <class id="bren" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note" oils_persist:field_safe="true">
7565                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7566                         <field reporter:label="Creation Date" name="create_date" reporter:datatype="timestamp"/>
7567                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7568                         <field reporter:label="Last Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7569                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7570                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
7571                         <field reporter:label="Public" name="pub" reporter:datatype="bool"/>
7572                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
7573                         <field reporter:label="Note" name="value" reporter:datatype="text"/>
7574                         <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/> 
7575                 </fields>
7576                 <links>
7577                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7578                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7579                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7580                 </links>
7581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7582                 <actions>
7583                     <create permission="CREATE_RECORD_NOTE" global_required="true"/>
7584                     <retrieve/>
7585                     <update permission="UPDATE_RECORD_NOTE" global_required="true"/>
7586                     <delete permission="DELETE_RECORD_NOTE" global_required="true"/>
7587                 </actions>
7588              </permacrud>
7589         </class>
7590         <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">
7591                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7592                         <field name="balance_owed" reporter:datatype="money" />
7593                         <field name="total_owed" reporter:datatype="money" />
7594                         <field name="total_paid" reporter:datatype="money" />
7595                         <field name="usr" reporter:datatype="link"/>
7596                 </fields>
7597                 <links>
7598                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7599                 </links>
7600         </class>
7601     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7602                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7603                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7604                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7605                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7606                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7607                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7608                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7609                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7610                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7611                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7612                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7613                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7614                 </fields>
7615                 <links>
7616                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7617                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7618                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7619                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7620                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7621                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7622                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7623                 </links>
7624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7625             <actions>
7626                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7627             </actions>
7628         </permacrud>
7629         </class>
7630         <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">
7631                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7632                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7633                         <field name="quality" reporter:datatype="int" />
7634                         <field name="source" reporter:datatype="text"/>
7635                         <field name="transcendant" reporter:datatype="bool"/>
7636                         <field name="can_have_copies" reporter:datatype="bool"/>
7637                 </fields>
7638                 <links/>
7639         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7640             <actions>
7641                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7642                 <retrieve/>
7643                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7644                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7645             </actions>
7646         </permacrud>
7647         </class>
7648         <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">
7649                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7650                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7651                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7652                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7653                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7654                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7655                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7656                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7657                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7658                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7659                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7660                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7661                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7662                 </fields>
7663                 <links>
7664                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7665                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7666                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7667                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7668                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7669                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7670                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7671                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7672                 </links>
7673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7674                         <actions>
7675                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7676                                         <context link="usr" field="home_ou" />
7677                                 </retrieve>
7678                         </actions>
7679                 </permacrud>
7680         </class>
7681         <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">
7682                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7683                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7684                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7685                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7686                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7687                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7688                 </fields>
7689                 <links>
7690                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7691                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7692                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7693                 </links>
7694         </class>
7695         <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">
7696                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7697                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7698                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7699                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7700                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7701                 </fields>
7702                 <links>
7703                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7704                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7705                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7706                 </links>
7707         </class>
7708         <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">
7709                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7710                         <field name="bucket" reporter:datatype="link"/>
7711                         <field name="id" reporter:datatype="id" />
7712                         <field name="target_user" reporter:datatype="link"/>
7713                         <field name="create_time" reporter:datatype="timestamp" />
7714                         <field name="pos" reporter:datatype="int" />
7715                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7716                 </fields>
7717                 <links>
7718                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7719                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7720             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7721                 </links>
7722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7723                         <actions>
7724                                 <retrieve permission="ADMIN_USER_BUCKET">
7725                     <context link="bucket" owning_lib="owning_lib"/>
7726                 </retrieve>
7727             </actions>
7728         </permacrud>
7729         </class>
7730         <class id="abhe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::batch_hold_event" oils_persist:tablename="action.batch_hold_event" reporter:label="Hold Group Event">
7731                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_id_seq">
7732                         <field name="id" reporter:datatype="id" />
7733                         <field name="staff" reporter:datatype="link"/>
7734                         <field name="bucket" reporter:datatype="link"/>
7735                         <field name="target" reporter:datatype="int" />
7736                         <field name="hold_type" reporter:datatype="text" />
7737                         <field name="run_date" reporter:datatype="timestamp" />
7738                         <field name="cancelled" reporter:datatype="timestamp" />
7739                         <field name="mappings" oils_persist:virtual="true" reporter:datatype="link" />
7740                 </fields>
7741                 <links>
7742                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7743                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7744                         <link field="mappings" reltype="has_many" key="batch_hold_event" map="" class="abhem"/>
7745                 </links>
7746                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7747                         <actions>
7748                 <create permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7749                 <retrieve/>
7750                 <update permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7751                 <delete permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7752             </actions>
7753         </permacrud>
7754         </class>
7755         <class id="abhem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::batch_hold_event_map" oils_persist:tablename="action.batch_hold_event_map" reporter:label="Hold Group Event Map">
7756                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_map_id_seq">
7757                         <field name="id" reporter:datatype="id" />
7758                         <field name="batch_hold_event" reporter:datatype="link"/>
7759                         <field name="hold" reporter:datatype="link"/>
7760                 </fields>
7761                 <links>
7762                         <link field="batch_hold_event" reltype="has_a" key="id" map="" class="abhe"/>
7763                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7764                 </links>
7765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7766                         <actions>
7767                 <retrieve/>
7768             </actions>
7769         </permacrud>
7770         </class>
7771         <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">
7772                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7773                         <field name="id" reporter:datatype="id" />
7774                         <field name="item" reporter:datatype="link"/>
7775                         <field name="note" reporter:datatype="text" />
7776                 </fields>
7777                 <links>
7778                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7779                 </links>
7780         </class>
7781         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7782                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7783                         <field name="balance_owed" reporter:datatype="money" />
7784                         <field name="total_owed" reporter:datatype="money" />
7785                         <field name="total_paid" reporter:datatype="money" />
7786                         <field name="usr" reporter:datatype="link"/>
7787                 </fields>
7788                 <links>
7789                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7790                 </links>
7791         </class>
7792         <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">
7793                 <fields oils_persist:primary="code" oils_persist:sequence="">
7794                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7795                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7796                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7797                 </fields>
7798                 <links/>
7799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7800             <actions>
7801                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7802                 <retrieve/>
7803                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7804                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7805             </actions>
7806         </permacrud>
7807         </class>
7808         <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">
7809                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7810                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7811                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7812                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7813                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7814                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7815                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7816                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7817                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7818                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7819                 </fields>
7820                 <links>
7821                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7822                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7823                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7824                 </links>
7825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7826             <actions>
7827                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7828                     <context link="xact" jump="usr" field="home_ou"/>
7829                 </retrieve>
7830                         </actions>
7831                 </permacrud>
7832         </class>
7833         <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">
7834                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7835                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7836                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7837                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7838                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7839                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7840                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7841                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7842                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7843                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7844                 </fields>
7845                 <links>
7846                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7847                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7848                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7849                 </links>
7850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7851             <actions>
7852                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7853                     <context link="xact" jump="usr" field="home_ou"/>
7854                 </retrieve>
7855                         </actions>
7856                 </permacrud>
7857         </class>
7858         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7859                 <fields oils_persist:primary="id" oils_persist:sequence="">
7860                         <field name="checkin_lib" reporter:datatype="link"/>
7861                         <field name="checkin_staff" reporter:datatype="link"/>
7862                         <field name="checkin_time" reporter:datatype="timestamp"/>
7863                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7864                         <field name="circ_staff" reporter:datatype="link"/>
7865                         <field name="desk_renewal" reporter:datatype="bool"/>
7866                         <field name="due_date" reporter:datatype="timestamp"/>
7867                         <field name="duration" reporter:datatype="interval"/>
7868                         <field name="duration_rule" reporter:datatype="link"/>
7869                         <field name="fine_interval" reporter:datatype="interval"/>
7870                         <field name="id" reporter:datatype="id" />
7871                         <field name="max_fine" reporter:datatype="money" />
7872                         <field name="max_fine_rule" reporter:datatype="link"/>
7873                         <field name="opac_renewal" reporter:datatype="bool"/>
7874                         <field name="phone_renewal" reporter:datatype="bool"/>
7875                         <field name="recurring_fine" reporter:datatype="money" />
7876                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7877                         <field name="renewal_remaining" reporter:datatype="int" />
7878             <field name="grace_period" reporter:datatype="interval" />
7879                         <field name="stop_fines" reporter:datatype="text"/>
7880                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7881                         <field name="target_copy" reporter:datatype="link"/>
7882                         <field name="usr" reporter:datatype="link"/>
7883                         <field name="xact_finish" reporter:datatype="timestamp" />
7884                         <field name="xact_start" reporter:datatype="timestamp" />
7885                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7886                         <field name="auto_renewal" reporter:datatype="bool"/>
7887                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7888                 </fields>
7889                 <links>
7890                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7891                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7892                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7893                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7894                 </links>
7895         </class>
7896         <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">
7897                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7898                         <field name="field" reporter:datatype="link"/>
7899                         <field name="id" reporter:datatype="id" />
7900                         <field name="source" reporter:datatype="link"/>
7901                         <field name="value" reporter:datatype="text"/>
7902                 </fields>
7903                 <links>
7904                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7905                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7906                 </links>
7907         </class>
7908         <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">
7909                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7910                         <field name="high" reporter:datatype="money" />
7911                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7912                         <field name="low" reporter:datatype="money" />
7913                         <field name="name" reporter:datatype="text"/>
7914                         <field name="normal" reporter:datatype="money" />
7915                         <field name="recurrence_interval" reporter:datatype="interval"/>
7916             <field name="grace_period" reporter:datatype="interval" />
7917                 </fields>
7918                 <links/>
7919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7920             <actions>
7921                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7922                 <retrieve/>
7923                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7924                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7925             </actions>
7926         </permacrud>
7927         </class>
7928         <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">
7929                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7930                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7931                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7932                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7933                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7934                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7935                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7936                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7937                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7938                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7939                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7940                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7941                 </fields>
7942                 <links>
7943                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7944                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7945                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7946                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7947                 </links>
7948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7949             <actions>
7950                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7951                     <context link="xact" jump="usr" field="home_ou"/>
7952                 </retrieve>
7953                         </actions>
7954                 </permacrud>
7955         </class>
7956         <class id="mdcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::debit_card_payment" oils_persist:tablename="money.debit_card_payment" reporter:label="Debit Card Payment">
7957                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7958                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7959                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7960                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7961                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7962                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7963                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7964                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7965                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7966                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7967                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7968                 </fields>
7969                 <links>
7970                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7971                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7972                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7973                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7974                 </links>
7975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7976             <actions>
7977                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7978                     <context link="xact" jump="usr" field="home_ou"/>
7979                 </retrieve>
7980                         </actions>
7981                 </permacrud>
7982         </class>
7983         <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">
7984                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7985                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7986                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7987                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7988                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7989                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7990                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7991                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7992                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7993                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7994                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7995                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7996                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7997                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7998                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7999                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
8000                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
8001                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
8002                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
8003                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
8004                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
8005                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8006                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
8007                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
8008                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8009                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
8010                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
8011                         <field reporter:label="Price" name="price" reporter:datatype="money" />
8012                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
8013                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
8014                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
8015                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
8016                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8017                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
8018                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
8019                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
8020                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8021                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8022                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
8023                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
8024                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
8025                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
8026                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
8027                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
8028                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
8029                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
8030                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
8031                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
8032                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
8033                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8034                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
8035                 </fields>
8036                 <links>
8037                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8038                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8039                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8040                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8041                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8042                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8043                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8044                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
8045                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
8046                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
8047                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
8048                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
8049                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
8050                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
8051                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
8052                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
8053                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8054                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
8055                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
8056                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
8057                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
8058                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
8059                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8060                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
8061                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
8062                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
8063                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8064                 </links>
8065         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8066             <actions>
8067                 <create permission="CREATE_COPY">
8068                     <context link="call_number" field="owning_lib"/>
8069                 </create>
8070                 <retrieve/>
8071                 <update permission="UPDATE_COPY">
8072                     <context link="call_number" field="owning_lib"/>
8073                 </update>
8074                 <delete permission="DELETE_COPY">
8075                     <context link="call_number" field="owning_lib"/>
8076                 </delete>
8077             </actions>
8078         </permacrud>
8079         </class>
8080
8081         <class id="alci" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::latest_inventory" oils_persist:tablename="asset.latest_inventory" reporter:core="true" reporter:label="Latest Inventory">
8082                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
8083             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
8084                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
8085                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
8086                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
8087                 </fields>
8088                 <links>
8089                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
8090                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8091                 </links>
8092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8093             <actions>
8094                                 <create/>
8095                                 <retrieve/>
8096                                 <update/>
8097                                 <delete/>
8098             </actions>
8099         </permacrud>
8100         </class>
8101
8102         <class id="ccat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_alert_type" oils_persist:tablename="config.copy_alert_type" reporter:label="Copy Alert Type" oils_persist:restrict_primary="100">
8103                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
8104                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
8105                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
8106                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8107                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8108                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8109                         <field reporter:label="Event" name="event" reporter:datatype="text" />
8110                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
8111                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
8112                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
8113                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
8114                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
8115                 </fields>
8116                 <links>
8117                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
8118                 </links>
8119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8120             <actions>
8121                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8122                 <retrieve/>
8123                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8124                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
8125             </actions>
8126         </permacrud>
8127         </class>
8128
8129         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Item Alert Suppression">
8130                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
8131                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8132                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
8133                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8134                 </fields>
8135                 <links>
8136                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8137                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8138                 </links>
8139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8140             <actions>
8141                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8142                 <retrieve/>
8143                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8144                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
8145             </actions>
8146         </permacrud>
8147         </class>
8148
8149         <class id="aca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_alert" oils_persist:tablename="asset.copy_alert" reporter:label="Copy Alert">
8150                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
8151                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8152                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8153                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8154                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8155                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8156                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8157                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8158                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8159                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8160                 </fields>
8161                 <links>
8162                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8163                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8164                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8165                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8166                 </links>
8167         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8168             <actions>
8169                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8170                     <context link="copy" field="circ_lib"/>
8171                 </create>
8172                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8173                     <context link="copy" field="circ_lib"/>
8174                                 </retrieve>
8175                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8176                     <context link="copy" field="circ_lib"/>
8177                                 </update>
8178                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8179                     <context link="copy" field="circ_lib"/>
8180                                 </delete>
8181             </actions>
8182         </permacrud>
8183         </class>
8184
8185         <class id="aaca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::active_copy_alert" oils_persist:tablename="asset.active_copy_alert" reporter:label="Active Copy Alert" oils_persist:readonly="true">
8186                 <fields oils_persist:primary="id">
8187                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8188                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8189                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8190                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8191                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8192                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8193                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8194                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8195                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8196                 </fields>
8197                 <links>
8198                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8199                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8200                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8201                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8202                 </links>
8203         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8204             <actions>
8205                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8206                     <context link="copy" field="circ_lib"/>
8207                 </create>
8208                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8209                     <context link="copy" field="circ_lib"/>
8210                                 </retrieve>
8211                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8212                     <context link="copy" field="circ_lib"/>
8213                                 </update>
8214                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8215                     <context link="copy" field="circ_lib"/>
8216                                 </delete>
8217             </actions>
8218         </permacrud>
8219         </class>
8220
8221         <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">
8222                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
8223                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
8224                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
8225                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8226                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8227                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8228                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8229                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8230                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
8231                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
8232                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8233                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8234                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8235                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
8236                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
8237                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
8238                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
8239                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
8240                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
8241                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
8242                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
8243                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
8244                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
8245                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
8246                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8247                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
8248                 </fields>
8249                 <links>
8250                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8251                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8252                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8253                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8254                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8255                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8256                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8257                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8258                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8259                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8260                 </links>
8261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8262                         <actions>
8263                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8264                                 <retrieve />
8265                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8266                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8267                         </actions>
8268                 </permacrud>
8269         </class>
8270
8271         <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">
8272                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
8273                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
8274                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8275                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8276                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
8277                 </fields>
8278                 <links/>
8279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8280             <actions>
8281                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8282                 <retrieve/>
8283                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8284                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8285             </actions>
8286         </permacrud>
8287         </class>
8288         <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">
8289                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
8290                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
8291                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8292                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8293                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
8294                 </fields>
8295                 <links/>
8296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8297             <actions>
8298                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8299                 <retrieve/>
8300                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8301                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8302             </actions>
8303         </permacrud>
8304         </class>
8305         <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">
8306                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
8307                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8309                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8310                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8311                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8312                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
8313                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
8314                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
8315                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
8316                 </fields>
8317                 <links>
8318                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
8319                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
8320                 </links>
8321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8322             <actions>
8323                 <create permission="CREATE_PERM" global_required="true"/>
8324                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8325                 <update permission="UPDATE_PERM" global_required="true"/>
8326                 <delete permission="DELETE_PERM" global_required="true"/>
8327             </actions>
8328         </permacrud>
8329         </class>
8330         <class id="pgtde" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree_display_entry" oils_persist:tablename="permission.grp_tree_display_entry" reporter:label="Permission Group Tree Display Entry">
8331                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
8332                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8333                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
8334                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8335                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
8336                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8337                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8338                 </fields>
8339                 <links>
8340                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
8341                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8342                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8343                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
8344                 </links>
8345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8346                         <actions>
8347                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8348                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8349                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8350                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8351                         </actions>
8352                 </permacrud>
8353         </class>
8354         <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">
8355                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
8356                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
8357                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
8358                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
8359                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
8360                 </fields>
8361                 <links>
8362                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
8363                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
8364                 </links>
8365         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8366             <actions>
8367                 <create permission="ADMIN_SURVEY">
8368                     <context link="question" jump="survey" field="owner"/>
8369                 </create>
8370                 <retrieve/>
8371                 <update permission="ADMIN_SURVEY">
8372                     <context link="question" jump="survey" field="owner"/>
8373                 </update>
8374                 <delete permission="ADMIN_SURVEY">
8375                     <context link="question" jump="survey" field="owner"/>
8376                 </delete>
8377             </actions>
8378         </permacrud>
8379         </class>
8380         <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">
8381                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
8382                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8383                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
8384                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
8385                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
8386                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
8387                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
8388                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
8389                 </fields>
8390                 <links>
8391                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
8392                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
8393                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
8394                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8395                 </links>
8396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8397                         <actions>
8398                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
8399                         </actions>
8400                 </permacrud>
8401         </class>
8402         <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">
8403                 <fields oils_persist:primary="usr" oils_persist:sequence="">
8404                         <field name="balance_owed" reporter:datatype="money" />
8405                         <field name="total_owed" reporter:datatype="money" />
8406                         <field name="total_paid" reporter:datatype="money" />
8407                         <field name="usr" reporter:datatype="link"/>
8408                 </fields>
8409                 <links>
8410                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8411                 </links>
8412         </class>
8413         <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">
8414                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
8415                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
8416                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
8417                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
8418                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
8419                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8420                 </fields>
8421                 <links>
8422                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8423                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
8424                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8425                 </links>
8426         </class>
8427         <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">
8428                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
8429                         <field name="field" reporter:datatype="link"/>
8430                         <field name="id" reporter:datatype="id" />
8431                         <field name="source" reporter:datatype="link"/>
8432                         <field name="value" reporter:datatype="text"/>
8433                 </fields>
8434                 <links>
8435                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8436                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8437                 </links>
8438         </class>
8439         <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">
8440                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
8441                         <field name="field" reporter:datatype="link"/>
8442                         <field name="id" reporter:datatype="id" />
8443                         <field name="source" reporter:datatype="link"/>
8444                         <field name="value" reporter:datatype="text"/>
8445                 </fields>
8446                 <links>
8447                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8448                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8449                 </links>
8450         </class>
8451         <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">
8452                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
8453                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
8454                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
8455                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
8456                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
8457                 </fields>
8458                 <links>
8459                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
8460                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
8461                 </links>
8462         </class>
8463         <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">
8464                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
8465                         <field name="depth" reporter:datatype="int" />
8466                         <field name="grantable" reporter:datatype="bool"/>
8467                         <field name="grp" reporter:datatype="link"/>
8468                         <field name="id" reporter:datatype="id" />
8469                         <field name="perm" reporter:datatype="link"/>
8470                 </fields>
8471                 <links>
8472                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8473                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8474                 </links>
8475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8476             <actions>
8477                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
8478                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
8479                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
8480                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
8481             </actions>
8482         </permacrud>
8483         </class>
8484         <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">
8485                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
8486                         <field name="items" oils_persist:virtual="true" />
8487                         <field name="btype" reporter:datatype="text"/>
8488                         <field name="id" reporter:datatype="id" />
8489                         <field name="name" reporter:datatype="text"/>
8490                         <field name="description" reporter:datatype="text"/>
8491                         <field name="owner" reporter:datatype="link"/>
8492                         <field name="pub" reporter:datatype="bool"/>
8493                         <field name="create_time" reporter:datatype="timestamp" />
8494                         <field name="owning_lib" reporter:datatype="org_unit" />
8495                 </fields>
8496                 <links>
8497                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8498                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8499                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8500                 </links>
8501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8502                         <actions>
8503                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8504                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8505                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8506                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8507                         </actions>
8508                 </permacrud>
8509         </class>
8510         <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">
8511                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8512                         <field name="id" reporter:datatype="id" />
8513                         <field name="bucket" reporter:datatype="link"/>
8514                         <field name="note" reporter:datatype="text" />
8515                 </fields>
8516                 <links>
8517                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8518                 </links>
8519         </class>
8520         <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">
8521                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8522                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8523                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8524                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8525                 </fields>
8526                 <links>
8527                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8528                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8529                 </links>
8530         </class>
8531         <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">
8532                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8533                         <field name="depth" reporter:datatype="int"/>
8534                         <field name="grantable" reporter:datatype="bool"/>
8535                         <field name="id" reporter:datatype="id" />
8536                         <field name="perm" reporter:datatype="link"/>
8537                         <field name="usr" reporter:datatype="link"/>
8538                 </fields>
8539                 <links>
8540                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8541                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8542                 </links>
8543         </class>
8544         <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">
8545                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8546                         <field name="object_id" reporter:datatype="text"/>
8547                         <field name="grantable" reporter:datatype="bool"/>
8548                         <field name="id" reporter:datatype="id" />
8549                         <field name="perm" reporter:datatype="link"/>
8550                         <field name="usr" reporter:datatype="link"/>
8551                         <field name="object_type" reporter:datatype="text"/>
8552                 </fields>
8553                 <links>
8554                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8555                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8556                 </links>
8557         </class>
8558         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8559                 <fields oils_persist:primary="id" oils_persist:sequence="">
8560                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8561                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8562                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8563                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8564                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8565                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8566                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8567                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8568                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8569                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8570                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8571                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8572                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8573                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8574                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8575                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8576                 </fields>
8577                 <links>
8578                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8579                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8580                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8581                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8582                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8583                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8584                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8585                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8586                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8587                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8588                 </links>
8589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8590             <actions>
8591                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8592                     <context link="xact" jump="usr" field="home_ou"/>
8593                 </retrieve>
8594                         </actions>
8595                 </permacrud>
8596         </class>
8597         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8598                 oils_obj:fieldmapper="money::aged_payment" 
8599                 oils_persist:tablename="money.aged_payment" 
8600                 reporter:label="Payments: Aged">
8601                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8602                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8603                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8604                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8605                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8606                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8607                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8608                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8609                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8610                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8611                         <field name="billing" reporter:datatype="link"/>
8612                 </fields>
8613                 <links>
8614                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8615                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8616                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8617                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8618                 </links>
8619                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8620                         <actions>
8621                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8622                                         <context link="xact" field="usr_home_ou"/>
8623                                 </retrieve>
8624                         </actions>
8625                 </permacrud>
8626         </class>
8627         <class id="mallp" controller="open-ils.cstore" 
8628                 oils_obj:fieldmapper="money::all_payments" 
8629                 oils_persist:tablename="money.all_payments" 
8630                 oils_persist="readonly" reporter:core="true"
8631                 reporter:label="Payments: All">
8632                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8633                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8634                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8635                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8636                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8637                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8638                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8639                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8640                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8641                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8642                         <field name="billing" reporter:datatype="link"/>
8643                 </fields>
8644                 <links>
8645                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8646                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8647                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8648                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8649                 </links>
8650         </class>
8651
8652         <class id="mbp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
8653                 <fields oils_persist:primary="id" oils_persist:sequence="">
8654                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8655                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8656                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8657                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8658                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8659                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8660                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8661                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8662                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8663                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8664                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8665                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8666                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8667                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8668                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8669                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8670                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8671                 </fields>
8672                 <links>
8673                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8674                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8675                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8676                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8677                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8678                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8679                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8680                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8681                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8682                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8683                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8684                 </links>
8685                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8686                         <actions>
8687                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8688                                         <context link="xact" jump="usr" field="home_ou"/>
8689                                 </retrieve>
8690                         </actions>
8691                 </permacrud>
8692         </class>
8693         <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">
8694                 <fields oils_persist:primary="id" oils_persist:sequence="">
8695                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8696                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8697                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8698                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8699                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8700                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8701                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8702                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8703                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8704                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8705                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8706                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8707                 </fields>
8708                 <links>
8709                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8710                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8711                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8712                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8713                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8714                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8715                 </links>
8716         </class>
8717         <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">
8718                 <fields oils_persist:primary="id" oils_persist:sequence="">
8719                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8720                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8721                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8722                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8723                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8724                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8725                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8726                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8727                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8728                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8729                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8730                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8731                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8732                 </fields>
8733                 <links>
8734                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8735                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8736                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8737                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8738                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8739                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8740                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8741                 </links>
8742         </class>
8743         <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">
8744                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8745                         <field name="bucket" reporter:datatype="link"/>
8746                         <field name="id" reporter:datatype="id" />
8747                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8748                         <field name="create_time" reporter:datatype="timestamp" />
8749                         <field name="pos" reporter:datatype="int" />
8750                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8751                 </fields>
8752                 <links>
8753                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8754                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8755             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8756                 </links>
8757                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8758                         <actions>
8759                                 <retrieve permission="ADMIN_COPY_BUCKET">
8760                     <context link="bucket" owning_lib="owning_lib"/>
8761                 </retrieve>
8762             </actions>
8763         </permacrud>
8764         </class>
8765         <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">
8766                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8767                         <field name="id" reporter:datatype="id" />
8768                         <field name="item" reporter:datatype="link"/>
8769                         <field name="note" reporter:datatype="text" />
8770                 </fields>
8771                 <links>
8772                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8773                 </links>
8774         </class>
8775         <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">
8776                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8777                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8778                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8779                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8780                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8781                 </fields>
8782                 <links>
8783                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8784                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8785                 </links>
8786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8787                         <actions>
8788                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8789                         </actions>
8790                 </permacrud>
8791         </class>
8792     <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">
8793         <fields oils_persist:primary="field">
8794             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8795             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8796             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8797         </fields>
8798         <links/>
8799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8800             <actions>
8801                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8802                 <retrieve />
8803                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8804                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8805             </actions>
8806         </permacrud>
8807     </class>
8808         <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">
8809                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8810                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8811                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8812                 </fields>
8813                 <links/>
8814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8815             <actions>
8816                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8817                 <retrieve/>
8818                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8819                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8820             </actions>
8821         </permacrud>
8822         </class>
8823
8824
8825         <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">
8826                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8827                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8828                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8829                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8830                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8831                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8832                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8833                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8834                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8835                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8836                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8837                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8838                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8839                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8840                 </fields>
8841                 <links>
8842                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8843                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8844                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8845                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8846                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8847                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8848                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8849                 </links>
8850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8851             <actions>
8852                 <create permission="TRANSIT_COPY">
8853                     <context link="target_copy" field="owner"/>
8854                 </create>
8855                 <retrieve/>
8856                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8857                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8858             </actions>
8859         </permacrud>
8860         </class>
8861         <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">
8862                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8863                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8864                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8865                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8866                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8867                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8868                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8869                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8870                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8871                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8872                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8873                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8874                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8875                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8876                 </fields>
8877                 <links>
8878                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8879                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8880                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8881                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8882                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8883                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8884                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8885                 </links>
8886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8887             <actions>
8888                 <create permission="TRANSIT_COPY" context_field="owner">
8889                     <context link="target_copy" field="circ_lib"/>
8890                 </create>
8891                 <retrieve/>
8892                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8893                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8894             </actions>
8895         </permacrud>
8896         </class>
8897         <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">
8898                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8899                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8900                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8901                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8902                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8903                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8904                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8905                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8906                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8907                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8908                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8909                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8910                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8911                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8912                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8913                 </fields>
8914                 <links>
8915                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8916                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8917                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8918                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8919                 </links>
8920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8921             <actions>
8922                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8923                     <context link="xact" jump="usr" field="home_ou"/>
8924                 </retrieve>
8925                         </actions>
8926                 </permacrud>
8927         </class>
8928         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8929                 oils_obj:fieldmapper="money::aged_billing" 
8930                 oils_persist:tablename="money.aged_billing" 
8931                 reporter:label="Aged Billing Line Item">
8932                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8933                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8934                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8935                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8936                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8937                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8938                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8939                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8940                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8941                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8942                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8943                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8944                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8945                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8946                 </fields>
8947                 <links>
8948                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8949                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8950                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8951                 </links>
8952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8953                         <actions>
8954                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8955                                         <context link="xact" field="usr_home_ou"/>
8956                                 </retrieve>
8957                         </actions>
8958                 </permacrud>
8959         </class>
8960         <class id="mallb" controller="open-ils.cstore" 
8961                 oils_obj:fieldmapper="money::all_billings" 
8962                 oils_persist:tablename="money.all_billings" 
8963                 oils_persist="readonly" reporter:label="All Billing Line Items">
8964                 <fields oils_persist:primary="id" oils_persist:sequence="">
8965                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8966                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8967                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8968                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8969                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8970                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8971                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8972                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8973                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8974                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8975                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8976                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8977                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8978                 </fields>
8979                 <links>
8980                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8981                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8982                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8983                 </links>
8984         </class>
8985         <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">
8986                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8987                         <field name="grp" />
8988                         <field name="id" reporter:datatype="id" />
8989                         <field name="usr" />
8990                 </fields>
8991                 <links>
8992                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8993                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8994                 </links>
8995         </class>
8996         <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">
8997                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8998                         <field name="id" reporter:datatype="id" />
8999                         <field name="fq_field" reporter:datatype="text"/>
9000                         <field name="identity_value" reporter:datatype="text"/>
9001                         <field name="translation" reporter:datatype="text"/>
9002                         <field name="string" reporter:datatype="text"/>
9003                 </fields>
9004                 <links>
9005                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
9006                 </links>
9007         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9008             <actions>
9009                 <create permission="CREATE_TRANSLATION" global_required="true"/>
9010                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
9011                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
9012                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
9013             </actions>
9014         </permacrud>
9015         </class>
9016         <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">
9017                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
9018                         <field name="id" reporter:datatype="id" />
9019                         <field name="fm_class" reporter:datatype="text"/>
9020                         <field name="field" reporter:datatype="text"/>
9021                         <field name="owner" reporter:datatype="org_unit"/>
9022                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
9023                 </fields>
9024                 <links>
9025                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9026                 </links>
9027         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9028             <actions>
9029                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9030                 <retrieve/>
9031                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9032                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
9033             </actions>
9034         </permacrud>
9035         </class>
9036         <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">
9037                 <fields oils_persist:primary="code">
9038                         <field name="code" reporter:datatype="id" />
9039                         <field name="marc_code" reporter:datatype="text"/>
9040                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
9041                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9042                         <field name="rtl" reporter:datatype="bool"/>
9043                 </fields>
9044                 <links/>
9045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9046             <actions>
9047                 <create permission="CREATE_LOCALE" global_required="true"/>
9048                 <retrieve/>
9049                 <update permission="UPDATE_LOCALE" global_required="true"/>
9050                 <delete permission="DELETE_LOCALE" global_required="true"/>
9051             </actions>
9052         </permacrud>
9053         </class>
9054         <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">
9055                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
9056                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
9057                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
9058                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
9059                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
9060                 </fields>
9061                 <links>
9062                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9063                 </links>
9064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9065             <actions>
9066                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
9067                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
9068                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
9069                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
9070             </actions>
9071         </permacrud>
9072         </class>
9073
9074         <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">
9075                 <fields oils_persist:primary="id">
9076                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9077                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9078                 </fields>
9079                 <links/>
9080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9081             <actions>
9082                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9083                 <retrieve/>
9084                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9085                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
9086             </actions>
9087         </permacrud>
9088         </class>
9089
9090         <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">
9091                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
9092                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9093                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9094                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9095                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9096                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9097                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9098                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9099                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9100                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9101                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9102                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9103                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9104                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9105                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9106                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9107                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9108                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9109                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9110                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9111                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9112                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9113                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9114                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9115                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9116                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9117                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9118                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9119                 </fields>
9120                 <links>
9121                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9122                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9123                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9124                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9125                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9126                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9127                 </links>
9128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9129             <actions>
9130                 <create permission="user_request.create">
9131                     <context link="usr" field="home_ou"/>
9132                                 </create>
9133                 <retrieve permission="user_request.view">
9134                     <context link="usr" field="home_ou"/>
9135                                 </retrieve>
9136                 <update permission="user_request.update">
9137                     <context link="usr" field="home_ou"/>
9138                                 </update>
9139                 <delete permission="user_request.delete">
9140                     <context link="usr" field="home_ou"/>
9141                                 </delete>
9142             </actions>
9143         </permacrud>
9144         </class>
9145
9146         <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist="readonly">
9147         <oils_persist:source_definition><![CDATA[
9148             SELECT r.*, CASE
9149                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
9150                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
9151                         WHEN l.state = 'received' THEN 5 -- Received
9152                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
9153                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
9154                         WHEN l.id IS NOT NULL THEN 2 -- Pending
9155                         WHEN l.id IS NULL THEN 1 -- New
9156                         ELSE 0 -- Error
9157                     END AS request_status
9158                     ,u.home_ou
9159             FROM      acq.user_request r
9160             JOIN actor.usr u ON (r.usr = u.id)
9161             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
9162             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
9163             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
9164         ]]></oils_persist:source_definition>
9165                 <fields oils_persist:primary="id">
9166                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9167                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9168                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9169                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9170                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9171                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9172                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9173                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9174                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9175                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9176                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9177                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9178                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9179                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9180                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9181                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9182                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9183                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9184                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9185                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9186                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9187                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9188                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9189                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9190                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9191                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9192                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9193                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
9194                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
9195                 </fields>
9196                 <links>
9197                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9198                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9199                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9200                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9201                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9202                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9203                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
9204                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9205                 </links>
9206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9207             <actions>
9208                 <retrieve permission="user_request.view">
9209                     <context link="usr" field="home_ou"/>
9210                                 </retrieve>
9211             </actions>
9212         </permacrud>
9213         </class>
9214
9215         <class id="aurst" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status_type" oils_persist:tablename="acq.user_request_status_type" reporter:label="Acquisition Patron Request Status Type">
9216                 <fields oils_persist:primary="id">
9217                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9218                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9219                 </fields>
9220                 <links/>
9221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9222             <actions>
9223                 <retrieve/>
9224             </actions>
9225         </permacrud>
9226         </class>
9227
9228         <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">
9229                 <fields oils_persist:primary="code">
9230                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
9231                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9232                 </fields>
9233                 <links/>
9234         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9235             <actions>
9236                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9237                 <retrieve/>
9238                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9239                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9240             </actions>
9241         </permacrud>
9242         </class>
9243
9244         <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">
9245                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
9246                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
9247                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
9248                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
9249                         <field reporter:label="Ratio" name="ratio" />
9250                 </fields>
9251                 <links>
9252                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
9253                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
9254                 </links>
9255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9256                         <actions>
9257                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9258                                 <retrieve/>
9259                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9260                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9261                         </actions>
9262                 </permacrud>
9263         </class>
9264
9265         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
9266                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
9267                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9268                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9269                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
9270                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true"/>
9271                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
9272                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
9273                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
9274                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
9275                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
9276                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9277                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9278                         <field reporter:label="URL" name="url" reporter:datatype="text" />
9279                         <field reporter:label="Email" name="email" reporter:datatype="text" />
9280                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
9281                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
9282                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
9283                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
9284                         <field reporter:label="Primary Contact" name="primary_contact" reporter:datatype="link" />
9285                         <field reporter:label="Contacts" name="contacts" oils_persist:virtual="true" reporter:datatype="link" />
9286                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
9287                         <field reporter:label="Holdings Subfields" name="holdings_subfields" oils_persist:virtual="true" reporter:datatype="link" />
9288                         <field reporter:label="Attribute Definitions" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9289                         <field reporter:label="EDI Accounts" name="edi_accounts" oils_persist:virtual="true" reporter:datatype="link" />
9290                 </fields>
9291                 <links>
9292                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9293                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9294                         <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
9295                         <link field="contacts" reltype="has_many" map="" key="provider" class="acqpc"/>
9296                         <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
9297                         <link field="primary_contact" reltype="has_a" map="" key="id" class="acqpc"/>
9298                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
9299                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
9300                         <link field="holdings_subfields" reltype="has_many" map="" key="provider" class="acqphsm"/>
9301                         <link field="attributes" reltype="has_many" map="" key="provider" class="acqlipad"/>
9302                         <link field="edi_accounts" reltype="has_many" map="" key="provider" class="acqedi"/>
9303                 </links>
9304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9305             <actions>
9306                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
9307                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
9308                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
9309                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
9310             </actions>
9311         </permacrud>
9312         </class>
9313
9314         <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">
9315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
9316                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9317                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9318                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9319                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9320                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9321                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9322                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9323                 </fields>
9324                 <links>
9325                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9326                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9327                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9328                 </links>
9329         </class>
9330
9331         <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">
9332                 <fields oils_persist:primary="code">
9333                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
9334                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9335                 </fields>
9336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9337             <actions>
9338                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9339                 <retrieve/>
9340                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9341                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9342             </actions>
9343                 </permacrud>
9344         </class>
9345
9346         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
9347                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
9348                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
9349                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
9350                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9351                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
9352                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
9353                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
9354                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
9355                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
9356                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
9357                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
9358                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9359                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
9360                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
9361                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
9362                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
9363                 </fields>
9364                 <links>
9365                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
9366                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9367                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
9368                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
9369                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
9370                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
9371                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
9372                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
9373                 </links>
9374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9375             <actions>
9376                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
9377                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
9378                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
9379                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
9380             </actions>
9381         </permacrud>
9382         </class>
9383
9384         <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">
9385                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
9386                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9387                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9388                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9389                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
9390                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
9391                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
9392                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9393                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
9394                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9395                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9396                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9397                 </fields>
9398                 <links>
9399                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9400                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9401                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9402                 </links>
9403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9404             <actions>
9405                 <create   permission="ADMIN_INVOICE">
9406                                         <context link="invoice" field="receiver"/>
9407                                 </create>
9408                 <retrieve permission="ADMIN_INVOICE">
9409                                         <context link="invoice" field="receiver"/>
9410                                 </retrieve>
9411                 <update   permission="ADMIN_INVOICE">
9412                                         <context link="invoice" field="receiver"/>
9413                                 </update>
9414                                 <delete   permission="ADMIN_INVOICE">
9415                                         <context link="invoice" field="receiver"/>
9416                                 </delete>
9417             </actions>
9418         </permacrud>
9419         </class>
9420
9421         <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">
9422                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
9423                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9424                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9425                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9426                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9427                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
9428                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
9429                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9430                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9431                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9432                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9433                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9434                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9435                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
9436                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9437                 </fields>
9438                 <links>
9439                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9440                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9441                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9442                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9443                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9444                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
9445                 </links>
9446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9447             <actions>
9448                 <create   permission="ADMIN_INVOICE">
9449                                         <context link="invoice" field="receiver"/>
9450                                 </create>
9451                 <retrieve permission="ADMIN_INVOICE">
9452                                         <context link="invoice" field="receiver"/>
9453                                 </retrieve>
9454                 <update   permission="ADMIN_INVOICE">
9455                                         <context link="invoice" field="receiver"/>
9456                                 </update>
9457                                 <delete   permission="ADMIN_INVOICE">
9458                                         <context link="invoice" field="receiver"/>
9459                                 </delete>
9460             </actions>
9461         </permacrud>
9462         </class>
9463
9464         <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">
9465                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
9466                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
9467                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9468                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9469                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9470                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9471                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9472                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text" oils_obj:required="true"/>
9473                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9474                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9475                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
9476                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
9477                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9478                 </fields>
9479                 <links>
9480                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9481                 </links>
9482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9483             <actions>
9484                 <create permission="ADMIN_PROVIDER">
9485                     <context link="provider" field="owner"/>
9486                 </create>
9487                 <retrieve permission="ADMIN_PROVIDER">
9488                     <context link="provider" field="owner"/>
9489                 </retrieve>
9490                 <update permission="ADMIN_PROVIDER">
9491                     <context link="provider" field="owner"/>
9492                 </update>
9493                 <delete permission="ADMIN_PROVIDER">
9494                     <context link="provider" field="owner"/>
9495                 </delete>
9496             </actions>
9497         </permacrud>
9498         </class>
9499
9500         <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">
9501                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9502                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9503                         <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true"/>
9504                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9505                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9506                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9507                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9508                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
9509         </fields>
9510                 <links>
9511                         <link field="addresses" reltype="has_many" key="contact" map="" class="acqpca"/>
9512                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9513                 </links>
9514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9515             <actions>
9516                 <create permission="ADMIN_PROVIDER">
9517                     <context link="provider" field="owner"/>
9518                 </create>
9519                 <retrieve permission="ADMIN_PROVIDER">
9520                     <context link="provider" field="owner"/>
9521                 </retrieve>
9522                 <update permission="ADMIN_PROVIDER">
9523                     <context link="provider" field="owner"/>
9524                 </update>
9525                 <delete permission="ADMIN_PROVIDER">
9526                     <context link="provider" field="owner"/>
9527                 </delete>
9528             </actions>
9529         </permacrud>
9530     </class>
9531         <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">
9532                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9533                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9534                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9535                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9536                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9537                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9538                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text" oils_obj:required="true"/>
9539                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9540                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9541                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9542                         <field reporter:label="Contact" name="contact" reporter:datatype="link" oils_obj:required="true"/>
9543                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9544                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9545                 </fields>
9546                 <links>
9547                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9548                 </links>
9549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9550             <actions>
9551                 <create permission="ADMIN_PROVIDER">
9552                     <context link="contact" jump='provider' field="owner"/>
9553                 </create>
9554                 <retrieve permission="ADMIN_PROVIDER">
9555                     <context link="contact" jump='provider' field="owner"/>
9556                 </retrieve>
9557                 <update permission="ADMIN_PROVIDER">
9558                     <context link="contact" jump='provider' field="owner"/>
9559                 </update>
9560                 <delete permission="ADMIN_PROVIDER">
9561                     <context link="contact" jump='provider' field="owner"/>
9562                 </delete>
9563             </actions>
9564         </permacrud>
9565         </class>
9566
9567         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
9568                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9569                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9570                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9571                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9572                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9573                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9574                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9575                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9576                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9577                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9578                 </fields>
9579                 <links>
9580                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9581                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9582                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9583                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9584                 </links>
9585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9586             <actions>
9587                 <create permission="ADMIN_ACQ_FUND">
9588                     <context link="src_fund" field="org"/>
9589                 </create>
9590                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9591                     <context link="src_fund" field="org"/>
9592                     <context link="dest_fund" field="org"/>
9593                 </retrieve>
9594                 <update permission="ADMIN_ACQ_FUND">
9595                     <context link="src_fund" field="org"/>
9596                 </update>
9597                 <delete permission="ADMIN_ACQ_FUND">
9598                     <context link="src_fund" field="org"/>
9599                 </delete>
9600             </actions>
9601         </permacrud>
9602         </class>
9603
9604         <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">
9605                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9606                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9607                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9608                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9609                 </fields>
9610                 <links>
9611             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9612                 </links>
9613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9614                         <actions>
9615                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9616                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9617                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9618                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9619                         </actions>
9620                 </permacrud>
9621         </class>
9622
9623         <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">
9624                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9625                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9626                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9627                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9628                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9629                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9630                 </fields>
9631                 <links>
9632                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9633                 </links>
9634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9635                         <actions>
9636                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9637                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9638                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9639                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9640                         </actions>
9641                 </permacrud>
9642         </class>
9643
9644         <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">
9645                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9646                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9647                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
9648                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true" />
9649                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true" />
9650                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9651                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true" />
9652                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9653                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9654                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9655                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9656                 </fields>
9657                 <links>
9658                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9659                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9660             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9661             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9662                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9663                 </links>
9664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9665             <actions>
9666                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9667                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9668                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9669                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9670             </actions>
9671         </permacrud>
9672         </class>
9673
9674         <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">
9675                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9676                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9677                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
9678                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
9679                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9680                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9681                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9682                 </fields>
9683                 <links>
9684                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9685                 </links>
9686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9687                         <actions>
9688                                 <create permission="ADMIN_FUNDING_SOURCE">
9689                     <context link="funding_source" field="owner"/>
9690                 </create>
9691                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9692                     <context link="funding_source" field="owner"/>
9693                 </retrieve>
9694                                 <update permission="ADMIN_FUNDING_SOURCE">
9695                     <context link="funding_source" field="owner"/>
9696                 </update>
9697                                 <delete permission="ADMIN_FUNDING_SOURCE">
9698                     <context link="funding_source" field="owner"/>
9699                 </delete>
9700                         </actions>
9701                 </permacrud>
9702         </class>
9703
9704         <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">
9705                 <fields oils_persist:primary="id">
9706                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9707                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9708                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9709                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9710                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9711                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9712                 </fields>
9713                 <links>
9714                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9715                 </links>
9716         </class>
9717
9718         <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">
9719                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9720                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9721                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9722                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9723                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9724                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9725                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9726                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9727                         <field reporter:label="Debit Time" name="create_time" reporter:datatype="timestamp" />
9728                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9729                         <field reporter:label="Invoice Items" name="invoice_items" reporter:datatype="link" oils_persist:virtual="true"/>
9730                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9731                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9732                 </fields>
9733                 <links>
9734                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9735                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9736                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9737                         <link field="invoice_items" reltype="has_many" key="fund_debit" map="" class="acqii"/>
9738                         <link field="po_items" reltype="has_many" key="fund_debit" map="" class="acqpoi"/>
9739                         <link field="lineitem_details" reltype="has_many" key="fund_debit" map="" class="acqlid"/>
9740                 </links>
9741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9742                         <actions>
9743                                 <create permission="ADMIN_ACQ_FUND">
9744                     <context link="fund" field="org"/>
9745                 </create>
9746                                 <retrieve permission="ADMIN_ACQ_FUND">
9747                     <context link="fund" field="org"/>
9748                 </retrieve>
9749                                 <update permission="ADMIN_ACQ_FUND">
9750                     <context link="fund" field="org"/>
9751                 </update>
9752                                 <delete permission="ADMIN_ACQ_FUND">
9753                     <context link="fund" field="org"/>
9754                 </delete>
9755                         </actions>
9756                 </permacrud>
9757         </class>
9758
9759         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9760                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9761                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9762                         <field reporter:label="Owner" name="org" reporter:datatype="org_unit" oils_obj:required="true" />
9763                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
9764                         <field reporter:label="Year" name="year" reporter:datatype="int" oils_obj:required="true" />
9765                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" oils_obj:required="true" />
9766                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9767                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9768                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9769                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9770                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9771                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9772                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9773                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9774                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9775                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9776                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9777                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9778                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9779                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9780                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9781                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9782                 </fields>
9783                 <links>
9784                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9785                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9786             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9787             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9788             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9789             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9790             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9791             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9792             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9793             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9794             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9795                 </links>
9796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9797             <actions>
9798                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9799                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9800                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9801                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9802             </actions>
9803         </permacrud>
9804         </class>
9805
9806         <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">
9807                 <fields oils_persist:primary="fund">
9808                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9809                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9810                 </fields>
9811                 <links>
9812                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9813                 </links>
9814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9815             <actions>
9816                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9817                                         <context link="fund" field="org" />
9818                 </retrieve>
9819             </actions>
9820         </permacrud>
9821         </class>
9822
9823         <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">
9824                 <fields oils_persist:primary="fund">
9825                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9826                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9827                 </fields>
9828                 <links>
9829                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9830                 </links>
9831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9832             <actions>
9833                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9834                                         <context link="fund" field="org" />
9835                 </retrieve>
9836             </actions>
9837         </permacrud>
9838         </class>
9839
9840         <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">
9841                 <fields oils_persist:primary="fund">
9842                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9843                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9844                 </fields>
9845                 <links>
9846                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9847                 </links>
9848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9849             <actions>
9850                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9851                                         <context link="fund" field="org" />
9852                 </retrieve>
9853             </actions>
9854         </permacrud>
9855         </class>
9856
9857         <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">
9858                 <fields oils_persist:primary="fund">
9859                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9860                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9861                 </fields>
9862                 <links>
9863                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9864                 </links>
9865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9866             <actions>
9867                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9868                                         <context link="fund" field="org" />
9869                 </retrieve>
9870             </actions>
9871         </permacrud>
9872         </class>
9873
9874         <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">
9875                 <fields oils_persist:primary="fund">
9876                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9877                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9878                 </fields>
9879                 <links>
9880                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9881                 </links>
9882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9883             <actions>
9884                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9885                                         <context link="fund" field="org" />
9886                 </retrieve>
9887             </actions>
9888         </permacrud>
9889         </class>
9890
9891    <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">
9892         <fields oils_persist:primary="fund">
9893             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9894             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9895         </fields>
9896         <links>
9897             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9898         </links>
9899     </class>
9900
9901    <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">
9902         <fields oils_persist:primary="fund">
9903             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9904             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9905         </fields>
9906         <links>
9907             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9908         </links>
9909     </class>
9910
9911    <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">
9912         <fields oils_persist:primary="fund">
9913             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9914             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9915         </fields>
9916         <links>
9917             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9918         </links>
9919     </class>
9920
9921    <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">
9922         <fields oils_persist:primary="fund">
9923             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9924             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9925         </fields>
9926         <links>
9927             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9928         </links>
9929     </class>
9930
9931    <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">
9932         <fields oils_persist:primary="fund">
9933             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9934             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9935         </fields>
9936         <links>
9937             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9938         </links>
9939     </class>
9940
9941         <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">
9942                 <fields oils_persist:primary="funding_source">
9943                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9944                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9945                 </fields>
9946                 <links>
9947                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9948                 </links>
9949         </class>
9950
9951         <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">
9952                 <fields oils_persist:primary="funding_source">
9953                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9954                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9955                 </fields>
9956                 <links>
9957                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9958                 </links>
9959         </class>
9960
9961         <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">
9962                 <fields oils_persist:primary="funding_source">
9963                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9964                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9965                 </fields>
9966                 <links>
9967                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9968                 </links>
9969         </class>
9970
9971         <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">
9972                 <fields oils_persist:primary="fund">
9973                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9974                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9975                 </fields>
9976                 <links>
9977                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9978                 </links>
9979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9980             <actions>
9981                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9982                                         <context link="fund" field="org" />
9983                 </retrieve>
9984             </actions>
9985         </permacrud>
9986     </class>
9987     <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">
9988         <oils_persist:source_definition><![CDATA[
9989             SELECT
9990                 acqf.*,
9991                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9992                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9993                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9994                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9995             FROM
9996                 acq.fund acqf
9997                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9998                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9999                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
10000                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
10001         ]]></oils_persist:source_definition>
10002         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
10003             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
10004             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
10005             <field reporter:label="Name" name="name" reporter:datatype="text" />
10006             <field reporter:label="Year" name="year" reporter:datatype="int" />
10007             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
10008             <field reporter:label="Code" name="code" reporter:datatype="text" />
10009             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
10010             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
10011             <field reporter:label="Active" name="active" reporter:datatype="bool" />
10012             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
10013             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
10014
10015             <!-- non fund-native fields -->
10016             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
10017             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
10018             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
10019             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
10020         </fields>
10021         <links>
10022             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
10023             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10024             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
10025         </links>
10026         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10027             <actions>
10028                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
10029             </actions>
10030         </permacrud>
10031         </class>
10032         <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">
10033                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
10034                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
10035                         <field reporter:label="Fund" name="fund" reporter:datatype="link" oils_obj:required="true" />
10036                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
10037                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
10038                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" oils_obj:required="true" />
10039                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10040                         <field reporter:label="Allocation Time" name="create_time" reporter:datatype="timestamp" />
10041                 </fields>
10042                 <links>
10043                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
10044                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10045                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
10046                 </links>
10047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10048                         <actions>
10049                                 <create permission="ADMIN_ACQ_FUND">
10050                     <context link="fund" field="org"/>
10051                 </create>
10052                                 <retrieve permission="ADMIN_ACQ_FUND">
10053                     <context link="fund" field="org"/>
10054                 </retrieve>
10055                                 <update permission="ADMIN_ACQ_FUND">
10056                     <context link="fund" field="org"/>
10057                 </update>
10058                                 <delete permission="ADMIN_ACQ_FUND">
10059                     <context link="fund" field="org"/>
10060                 </delete>
10061                         </actions>
10062                 </permacrud>
10063         </class>
10064
10065     <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">
10066         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
10067             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
10068             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
10069             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
10070             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
10071             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
10072             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
10073             <field reporter:label="Note" name="note" reporter:datatype="text" />
10074             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
10075         </fields>
10076         <links>
10077             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
10078             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10079             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
10080         </links>
10081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10082                         <actions>
10083                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10084                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10085                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10086                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
10087                         </actions>
10088                 </permacrud>
10089     </class>
10090
10091         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
10092                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
10093                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
10094                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
10095                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
10096                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
10097                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10098                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10099                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
10100                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
10101                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10102                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10103                 </fields>
10104                 <links>
10105                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10106                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10107                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10108                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10109                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
10110                 </links>
10111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10112                         <actions>
10113                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
10114                         </actions>
10115                 </permacrud>
10116         </class>
10117
10118         <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">
10119                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
10120                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
10121                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
10122                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10123                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
10124                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
10125                 </fields>
10126                 <links>
10127                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10128                 </links>
10129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10130                         <actions>
10131                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10132                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
10133                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10134                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10135                         </actions>
10136                 </permacrud>
10137         </class>
10138
10139         <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">
10140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
10141                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
10142                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
10143                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10144                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10145                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10146                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10147                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
10148                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10149                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10150                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
10151                         <field reporter:label="Name" name="name" reporter:datatype="text" />
10152                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10153                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10154                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
10155                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
10156                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
10157                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
10158                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
10159                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
10160                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
10161                 </fields>
10162                 <links>
10163                         <link field="state" reltype="has_a" key="id" map="" class="acqpostlbl"/>
10164                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10165                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10166                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10167                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
10168                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10169                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
10170                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
10171                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
10172                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10173                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10174                 </links>
10175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10176                         <actions>
10177                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10178                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10179                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10180                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10181                         </actions>
10182                 </permacrud>
10183         </class>
10184
10185         <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">
10186                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
10187                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10188                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10189                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10190                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
10191                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10192                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10193                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10194                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10195                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10196                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10197                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10198                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10199                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
10200                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10201                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10202                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10203                 </fields>
10204                 <links>
10205                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
10206                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10207                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10208                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10209                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10210                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10211                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10212                 </links>
10213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10214             <actions>
10215                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10216             </actions>
10217                 </permacrud>
10218         </class>
10219
10220         <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">
10221                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
10222                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
10223                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10224                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10225                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10226                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10227                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10228                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
10229                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10230                 </fields>
10231                 <links>
10232                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10233                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10234                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10235                 </links>
10236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10237             <actions>
10238                 <create permission="CREATE_PURCHASE_ORDER">
10239                     <context link="purchase_order" field="ordering_agency"/>
10240                 </create>
10241                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10242                     <context link="purchase_order" field="ordering_agency"/>
10243                 </retrieve>
10244                 <update permission="CREATE_PURCHASE_ORDER">
10245                     <context link="purchase_order" field="ordering_agency"/>
10246                 </update>
10247                 <delete permission="CREATE_PURCHASE_ORDER">
10248                     <context link="purchase_order" field="ordering_agency"/>
10249                 </delete>
10250             </actions>
10251                 </permacrud>
10252         </class>
10253
10254         <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">
10255                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
10256                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10257                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10258                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10259                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
10260                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
10261                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
10262                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10263                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
10264                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10265                         <field reporter:label="Target" name="target" reporter:datatype="int" />
10266                 </fields>
10267                 <links>
10268                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10269                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10270                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
10271                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10272                 </links>
10273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10274             <actions>
10275                 <create permission="CREATE_PURCHASE_ORDER">
10276                     <context link="purchase_order" field="ordering_agency"/>
10277                 </create>
10278                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10279                     <context link="purchase_order" field="ordering_agency"/>
10280                 </retrieve>
10281                 <update permission="CREATE_PURCHASE_ORDER">
10282                     <context link="purchase_order" field="ordering_agency"/>
10283                 </update>
10284                 <delete permission="CREATE_PURCHASE_ORDER">
10285                     <context link="purchase_order" field="ordering_agency"/>
10286                 </delete>
10287             </actions>
10288                 </permacrud>
10289         </class>
10290
10291         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
10292                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
10293                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
10294                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
10295                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
10296                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10297                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10298                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10299                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10300                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
10301                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
10302                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
10303                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
10304                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10305                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10306                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10307                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
10308                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10309                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10310                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10311                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
10312                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
10313                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
10314                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
10315                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
10316                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
10317                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
10318                 </fields>
10319                 <links>
10320                         <link field="state" reltype="has_a" key="id" map="" class="jubstlbl"/>
10321                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10322                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10323                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10324                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10325                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10326                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10327                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10328                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
10329                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
10330                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
10331                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10332                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
10333                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10334                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
10335                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
10336                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10337                 </links>
10338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10339                         <actions>
10340                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10341                                         <context link="purchase_order" field="ordering_agency"/>
10342                                         <context link="picklist" field="org_unit"/>
10343                                 </retrieve>
10344                         </actions>
10345                 </permacrud>
10346         </class>
10347
10348         <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">
10349                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
10350                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10351                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10352                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10353                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
10354                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10355                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10356                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
10357                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10358                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10359                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
10360                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
10361                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10362                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10363                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
10364                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
10365                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
10366                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10367                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
10368                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10369                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10370                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10371                 </fields>
10372                 <links>
10373                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
10374                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10375                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10376                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10377                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10378                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10379                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10380                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10381                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10382                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10383                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10384                 </links>
10385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10386                         <actions>
10387                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10388                                         <context link="purchase_order" field="ordering_agency"/>
10389                                         <context link="picklist" field="org_unit"/>
10390                                 </retrieve>
10391                         </actions>
10392                 </permacrud>
10393         </class>
10394
10395         <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">
10396                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
10397                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
10398                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10399                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10400                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10401                 </fields>
10402                 <links>
10403                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10404                 </links>
10405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10406                         <actions>
10407                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10408                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
10409                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10410                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10411                         </actions>
10412                 </permacrud>
10413         </class>
10414
10415         <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">
10416                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
10417                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
10418                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
10419                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10420                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10421                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10422                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10423                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
10424                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
10425                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10426                 </fields>
10427                 <links>
10428                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10429                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10430                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10431                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
10432                 </links>
10433         </class>
10434
10435         <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">
10436                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
10437                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
10438                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
10439                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
10440                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
10441                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
10442                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
10443                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
10444                 </fields>
10445                 <links>
10446                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10447                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
10448                 </links>
10449         </class>
10450
10451         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
10452                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
10453                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
10454                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
10455                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
10456                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
10457                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
10458                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
10459                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
10460                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
10461                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
10462                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10463                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
10464                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
10465                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10466                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
10467                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10468                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
10469                 </fields>
10470                 <links>
10471                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10472                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
10473                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10474                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10475                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10476                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10477                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10478                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10479                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
10480                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
10481                 </links>
10482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10483             <actions>
10484                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10485                     <context link="lineitem" jump="purchase_order" field="ordering_agency"/>
10486                     <context link="lineitem" jump="picklist" field="org_unit"/>
10487                 </retrieve>
10488             </actions>
10489         </permacrud>
10490         </class>
10491
10492         <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">
10493                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10494                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10495                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10496                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10497                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10498                 </fields>
10499                 <links/>
10500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10501                         <actions>
10502                                 <retrieve />
10503                         </actions>
10504                 </permacrud>
10505         </class>
10506
10507         <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">
10508                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10509                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10510                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10511                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10512                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10513                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10514             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10515                 </fields>
10516                 <links/>
10517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10518             <actions>
10519                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10520                 <retrieve />
10521                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10522                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10523             </actions>
10524         </permacrud>
10525         </class>
10526
10527         <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">
10528                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10529                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10530                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10531                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10532                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10533                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10534                 </fields>
10535                 <links/>
10536         </class>
10537         <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">
10538                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10539                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10540                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10541                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10542                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10543                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10544                 </fields>
10545                 <links>
10546                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10547                 </links>
10548         </class>
10549
10550         <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">
10551             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10552                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10553                 <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true" />
10554                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
10555                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true" />
10556                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10557                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10558         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10559
10560             </fields>
10561             <links>
10562                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10563             </links>
10564             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10565                 <actions>
10566                     <create permission="ADMIN_PROVIDER">
10567                         <context link="provider" field="owner"/>
10568                     </create>
10569                     <retrieve permission="ADMIN_PROVIDER">
10570                         <context link="provider" field="owner"/>
10571                     </retrieve>
10572                     <update permission="ADMIN_PROVIDER">
10573                         <context link="provider" field="owner"/>
10574                     </update>
10575                     <delete permission="ADMIN_PROVIDER">
10576                         <context link="provider" field="owner"/>
10577                     </delete>
10578                 </actions>
10579             </permacrud>
10580         </class>
10581         
10582         <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">
10583             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10584                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10585                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10586                 <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
10587                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" oils_obj:required="true" />
10588             </fields>
10589             <links>
10590                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10591             </links>
10592             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10593                 <actions>
10594                     <create permission="ADMIN_PROVIDER">
10595                         <context link="provider" field="owner"/>
10596                     </create>
10597                     <retrieve permission="ADMIN_PROVIDER">
10598                         <context link="provider" field="owner"/>
10599                     </retrieve>
10600                     <update permission="ADMIN_PROVIDER">
10601                         <context link="provider" field="owner"/>
10602                     </update>
10603                     <delete permission="ADMIN_PROVIDER">
10604                         <context link="provider" field="owner"/>
10605                     </delete>
10606                 </actions>
10607             </permacrud>
10608         </class>
10609         
10610         <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">
10611             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10612                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10613                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10614                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10615                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10616                 </fields>
10617                 <links/>
10618         </class>
10619
10620         <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">
10621                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10622                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10623                         <field name="label"         reporter:datatype="text"      reporter:label="Label" oils_obj:required="true"/>
10624                         <field name="host"          reporter:datatype="text"      reporter:label="Host" oils_obj:required="true"/>
10625                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10626                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10627                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10628                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10629                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner" oils_obj:required="true"/>
10630                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10631                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider" oils_obj:required="true"/>
10632                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10633                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10634                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10635                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10636                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes" oils_obj:required="true"/>
10637                 </fields>
10638                 <links>
10639                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10640                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10641                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10642                 </links>
10643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10644             <actions>
10645                 <create permission="ADMIN_PROVIDER">
10646                     <context link="provider" field="owner"/>
10647                 </create>
10648                 <retrieve permission="ADMIN_PROVIDER">
10649                     <context link="provider" field="owner"/>
10650                 </retrieve>
10651                 <update permission="ADMIN_PROVIDER">
10652                     <context link="provider" field="owner"/>
10653                 </update>
10654                 <delete permission="ADMIN_PROVIDER">
10655                     <context link="provider" field="owner"/>
10656                 </delete>
10657             </actions>
10658         </permacrud>
10659         </class>
10660
10661         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10662                 oils_obj:fieldmapper="acq::edi_attr" 
10663                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10664                 <fields oils_persist:primary="key">
10665                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10666                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10667                 </fields>
10668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10669             <actions>
10670                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10671                 <retrieve/>
10672                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10673                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10674             </actions>
10675         </permacrud>
10676         </class>
10677         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10678                 oils_obj:fieldmapper="acq::edi_attr_set" 
10679                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10680                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10681                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10682                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10683                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10684                         <field name="edi_accounts" reporter:datatype="link" oils_persist:virtual="true" reporter:label="EDI Accounts"/>
10685                 </fields>
10686                 <links>
10687                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10688                         <link field="edi_accounts" reltype="has_many" key="attr_set" map="" class="acqedi"/>
10689                 </links>
10690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10691             <actions>
10692                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10693                 <retrieve/>
10694                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10695                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10696             </actions>
10697         </permacrud>
10698         </class>
10699         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10700                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10701                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10702                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10703                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10704                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10705                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10706                 </fields>
10707                 <links>
10708                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10709                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10710                 </links>
10711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10712             <actions>
10713                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10714                 <retrieve/>
10715                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10716                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10717             </actions>
10718         </permacrud>
10719         </class>
10720
10721
10722         <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">
10723                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10724                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10725                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10726                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10727                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10728                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10729                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10730                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10731                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10732                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10733                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10734                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10735                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10736                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10737                 </fields>
10738                 <links>
10739                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10740                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10741                 </links>
10742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10743             <actions>
10744                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10745                     <context link="account" jump="provider" field="owner"/>
10746                 </retrieve>
10747                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10748                     <context link="account" jump="provider" field="owner"/>
10749                 </update>
10750                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10751                     <context link="account" jump="provider" field="owner"/>
10752                 </delete>
10753             </actions>
10754         </permacrud>
10755         </class>
10756
10757
10758         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10759                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10760                         <field name="id" reporter:datatype="id" />
10761                         <field name="parent" reporter:datatype="link"/>
10762                         <field name="owner" reporter:datatype="link"/>
10763                         <field name="create_time" reporter:datatype="timestamp"/>
10764                         <field name="name" reporter:datatype="text"/>
10765                         <field name="shared" reporter:datatype="bool"/>
10766                         <field name="share_with" reporter:datatype="link"/>
10767                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10768                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10769                 </fields>
10770                 <links>
10771                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10772                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10773                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10774                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10775                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10776                 </links>
10777         </class>
10778         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10779                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10780                         <field name="id" reporter:datatype="id" />
10781                         <field name="parent" reporter:datatype="link"/>
10782                         <field name="owner" reporter:datatype="link"/>
10783                         <field name="create_time" reporter:datatype="timestamp"/>
10784                         <field name="name" reporter:datatype="text"/>
10785                         <field name="shared" reporter:datatype="bool"/>
10786                         <field name="share_with" reporter:datatype="link"/>
10787                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10788                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10789                 </fields>
10790                 <links>
10791                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10792                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10793                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10794                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10795                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10796                 </links>
10797         </class>
10798         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10799                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10800                         <field name="id" reporter:datatype="id" />
10801                         <field name="parent" reporter:datatype="link"/>
10802                         <field name="owner" reporter:datatype="link"/>
10803                         <field name="create_time" reporter:datatype="timestamp"/>
10804                         <field name="name" reporter:datatype="text"/>
10805                         <field name="shared" reporter:datatype="bool"/>
10806                         <field name="share_with" reporter:datatype="link"/>
10807                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10808                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10809                 </fields>
10810                 <links>
10811                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10812                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10813                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10814                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10815                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10816                 </links>
10817         </class>
10818         <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">
10819                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10820                         <field name="id" reporter:datatype="id" />
10821                         <field name="owner" reporter:datatype="link"/>
10822                         <field name="create_time" reporter:datatype="timestamp"/>
10823                         <field name="name" reporter:datatype="text"/>
10824                         <field name="data" reporter:datatype="text"/>
10825                         <field name="folder" reporter:datatype="link"/>
10826                         <field name="description" reporter:datatype="text"/>
10827                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10828                 </fields>
10829                 <links>
10830                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10831                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10832                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10833                 </links>
10834         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10835             <actions>
10836                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10837                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10838                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10839                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10840             </actions>
10841         </permacrud>
10842         </class>
10843         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10844                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10845                         <field name="id" reporter:datatype="id" />
10846                         <field name="owner" reporter:datatype="link"/>
10847                         <field name="create_time" reporter:datatype="timestamp"/>
10848                         <field name="template" reporter:datatype="link"/>
10849                         <field name="data" reporter:datatype="text"/>
10850                         <field name="folder" reporter:datatype="link"/>
10851                         <field name="recur" reporter:datatype="bool"/>
10852                         <field name="recurrence" reporter:datatype="interval"/>
10853                         <field name="name" reporter:datatype="text"/>
10854                         <field name="description" reporter:datatype="text"/>
10855                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10856                 </fields>
10857                 <links>
10858                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10859                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10860                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10861                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10862                 </links>
10863         </class>
10864         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10865                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10866                         <field name="id" reporter:datatype="id" />
10867                         <field name="runner" reporter:datatype="link"/>
10868                         <field name="start_time" reporter:datatype="timestamp"/>
10869                         <field name="complete_time" reporter:datatype="timestamp"/>
10870                         <field name="run_time" reporter:datatype="timestamp"/>
10871                         <field name="email" reporter:datatype="text"/>
10872                         <field name="excel_format" reporter:datatype="bool"/>
10873                         <field name="csv_format" reporter:datatype="bool"/>
10874                         <field name="html_format" reporter:datatype="bool"/>
10875                         <field name="error_code" reporter:datatype="int"/>
10876                         <field name="error_text" reporter:datatype="text"/>
10877                         <field name="report" reporter:datatype="link"/>
10878                         <field name="folder" reporter:datatype="link"/>
10879                         <field name="chart_pie" reporter:datatype="bool"/>
10880                         <field name="chart_bar" reporter:datatype="bool"/>
10881                         <field name="chart_line" reporter:datatype="bool"/>
10882                 </fields>
10883                 <links>
10884                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10885                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10886                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10887                 </links>
10888         </class>
10889         <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">
10890                 <fields oils_persist:primary="id">
10891                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10892                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10893                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10894                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10895                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10896                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10897                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10898                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10899                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10900                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10901                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10902                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10903                 </fields>
10904                 <links>
10905                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10906                 </links>
10907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10908                         <actions>
10909                                 <retrieve />
10910                         </actions>
10911                 </permacrud>
10912         </class>
10913         <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">
10914                 <fields oils_persist:primary="id">
10915                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10916                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10917                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10918                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10919                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10920                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10921                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10922                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10923                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10924                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10925                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10926                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10927                 </fields>
10928                 <links>
10929                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10930                 </links>
10931         </class>
10932         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10933                 <fields oils_persist:primary="id">
10934                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10935                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10936                         <field reporter:label="Fingerprint" name="fingerprint" />
10937                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10938                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10939                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10940                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10941                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10942                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10943                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10944                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10945                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10946                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10947                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10948                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10949                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10950                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10951                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10952                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10953                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10954                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10955                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10956                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10957                 </fields>
10958                 <links>
10959                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10960                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10961                 </links>
10962         </class>
10963         <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">
10964                 <fields oils_persist:primary="id">
10965                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10966                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10967                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10968                         <field reporter:label="Detailed Age Division" name="age_division" reporter:datatype="text"/>
10969                 </fields>
10970                 <links>
10971                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10972                 </links>
10973         </class>
10974         <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">
10975                 <fields oils_persist:primary="id">
10976                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10977                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10978                 </fields>
10979                 <links>
10980                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10981                 </links>
10982         </class>
10983         <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
10984                 <fields oils_persist:primary="id">
10985                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10986                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10987                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10988                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10989                 </fields>
10990                 <links>
10991                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10992                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10993                 </links>
10994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10995                         <actions>
10996                                 <retrieve permission="VIEW_HOLD">
10997                                         <context link="id" field="pickup_lib"/>
10998                                 </retrieve>
10999                         </actions>
11000                 </permacrud>
11001         </class>
11002         <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">
11003                 <fields oils_persist:primary="xact">
11004                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
11005                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
11006                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
11007                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
11008                 </fields>
11009                 <links>
11010                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
11011                 </links>
11012         </class>
11013         <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">
11014                 <fields oils_persist:primary="xact">
11015                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
11016                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
11017                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
11018                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
11019                 </fields>
11020                 <links>
11021                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
11022                 </links>
11023         </class>
11024         <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)">
11025                 <fields oils_persist:primary="id">
11026                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
11027                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
11028                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
11029                 </fields>
11030                 <links>
11031                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11032                 </links>
11033         </class>
11034         <class id="erfcc" controller="open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
11035                 <fields oils_persist:primary="id">
11036                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
11037                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
11038                 </fields>
11039                 <links>
11040                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11041                 </links>
11042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11043                         <actions>
11044                                 <retrieve permission="STAFF_LOGIN">
11045                                         <context link="id" field="circ_lib"/>
11046                                 </retrieve>
11047                         </actions>
11048                 </permacrud>
11049         </class>
11050         <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">
11051                 <fields oils_persist:primary="bibid">
11052                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
11053                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
11054                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
11055                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
11056                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
11057                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
11058                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
11059                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
11060                 </fields>
11061                 <links>
11062                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
11063                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11064                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11065                 </links>
11066         </class>
11067         <class id="rcsv" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::copy_statistics_view" oils_persist:tablename="reporter.copy_statistics_view" reporter:label="Item Statistics View">
11068                 <fields oils_persist:primary="copy_id">
11069                         <field reporter:label="Item ID" name="copy_id" reporter:datatype="link"/>
11070                         <field reporter:label="Owning Library Link" name="owning_lib_id" reporter:datatype="link"/>
11071                         <field reporter:label="Consortium: Last Circulation Date" name="consortium_last_circ_date" reporter:datatype="timestamp"/>
11072                         <field reporter:label="System: Last Circulation Date" name="system_last_circ_date" reporter:datatype="timestamp"/>
11073                         <field reporter:label="Branch: Last Circulation Date" name="branch_last_circ_date" reporter:datatype="timestamp"/>
11074                         <field reporter:label="Consortium: Last Checkin Date" name="consortium_last_checkin_date" reporter:datatype="timestamp"/>
11075                         <field reporter:label="System: Last Checkin Date" name="system_last_checkin_date" reporter:datatype="timestamp"/>
11076                         <field reporter:label="Branch: Last Checkin Date" name="branch_last_checkin_date" reporter:datatype="timestamp"/>
11077                         <field reporter:label="Consortium: Last Due Date" name="consortium_last_due_date" reporter:datatype="timestamp"/>
11078                         <field reporter:label="System: Last Due Date" name="system_last_due_date" reporter:datatype="timestamp"/>
11079                         <field reporter:label="Branch: Last Due Date" name="branch_last_due_date" reporter:datatype="timestamp"/>
11080                         <field reporter:label="Consortium: Month-to-Date Circulation" name="consortium_month_to_date_circ" reporter:datatype="int"/>
11081                         <field reporter:label="System: Month-to-Date Circulation" name="system_month_to_date_circ" reporter:datatype="int"/>
11082                         <field reporter:label="Branch: Month-to-Date Circulation" name="branch_month_to_date_circ" reporter:datatype="int"/>
11083                         <field reporter:label="Consortium: Year-to-Date Circulation" name="consortium_year_to_date_circ" reporter:datatype="int"/>
11084                         <field reporter:label="System: Year-to-Date Circulation" name="system_year_to_date_circ" reporter:datatype="int"/>
11085                         <field reporter:label="Branch: Year-to-Date Circulation" name="branch_year_to_date_circ" reporter:datatype="int"/>
11086                         <field reporter:label="Consortium: Lifetime Circulation" name="consortium_lifetime_circ" reporter:datatype="int"/>
11087                         <field reporter:label="System: Lifetime Circulation" name="system_lifetime_circ" reporter:datatype="int"/>
11088                         <field reporter:label="Branch: Lifetime Circulation" name="branch_lifetime_circ" reporter:datatype="int"/>
11089                         <field reporter:label="Consortium: Current Title Hold Count" name="consortium_current_title_hold_count" reporter:datatype="int"/>
11090                         <field reporter:label="System: Current Title Hold Count" name="system_current_title_hold_count" reporter:datatype="int"/>
11091                         <field reporter:label="Branch: Current Title Hold Count" name="branch_current_title_hold_count" reporter:datatype="int"/>
11092                         <field reporter:label="Consortium: Lifetime Title Hold Count" name="consortium_lifetime_holds" reporter:datatype="int"/>
11093                         <field reporter:label="System: Lifetime Title Hold Count" name="system_lifetime_holds" reporter:datatype="int"/>
11094                         <field reporter:label="Branch: Lifetime Title Hold Count" name="branch_lifetime_holds" reporter:datatype="int"/>
11095                         <field reporter:label="Consortium: Lifetime Transits" name="consortium_lifetime_transits" reporter:datatype="int"/>
11096                         <field reporter:label="System: Lifetime Outbound Transits" name="system_lifetime_transits" reporter:datatype="int"/>
11097                         <field reporter:label="Branch: Lifetime Outbound Transits" name="branch_lifetime_transits" reporter:datatype="int"/>
11098                 </fields>
11099                 <links>
11100                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11101                         <link field="owning_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11102                 </links>
11103         </class>
11104         <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">
11105                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
11106                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
11107                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
11108                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
11109                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
11110                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
11111                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
11112                 </fields>
11113                 <links>
11114                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11115                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
11116                 </links>
11117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11118                         <actions>
11119                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11120                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11121                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11122                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
11123                         </actions>
11124                 </permacrud>
11125         </class>
11126         <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">
11127                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
11128                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
11129                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
11130                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
11131                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11132                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11133                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
11134                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
11135                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
11136                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
11137                 </fields>
11138                 <links>
11139                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
11140                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11141                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
11142                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11143                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
11144                 </links>
11145                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11146                         <actions>
11147                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
11148                                         <context link="formula" field="owner"/>
11149                                 </create>
11150                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
11151                                         <context link="formula" field="owner"/>
11152                                 </retrieve>
11153                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
11154                                         <context link="formula" field="owner"/>
11155                                 </update>
11156                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
11157                                         <context link="formula" field="owner"/>
11158                                 </delete>
11159                         </actions>
11160                 </permacrud>
11161         </class>
11162
11163         <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">
11164                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
11165                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11166                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11167                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11168                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
11169                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11170                 </fields>
11171                 <links>
11172                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11173                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
11174                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11175                 </links>
11176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11177                         <actions>
11178                                 <create permission="CREATE_PURCHASE_ORDER">
11179                                         <context link="formula" field="owner"/>
11180                 </create>
11181                                 <retrieve permission="CREATE_PURCHASE_ORDER">
11182                                         <context link="formula" field="owner"/>
11183                 </retrieve>
11184                                 <update permission="CREATE_PURCHASE_ORDER">
11185                                         <context link="formula" field="owner"/>
11186                 </update>
11187                                 <delete permission="CREATE_PURCHASE_ORDER">
11188                                         <context link="formula" field="owner"/>
11189                 </delete>
11190                         </actions>
11191                 </permacrud>
11192         </class>
11193
11194         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
11195                 <fields oils_persist:primary="id">
11196                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
11197                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
11198                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
11199                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
11200                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
11201                 </fields>
11202                 <links>
11203                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
11204                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
11205                 </links>
11206         </class>
11207
11208         <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">
11209                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
11210                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11211                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11212                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11213                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11214                 </fields>
11215                 <links>
11216                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11217                 </links>
11218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11219                         <actions>
11220                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11221                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11222                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11223                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11224                         </actions>
11225                 </permacrud>
11226         </class>
11227
11228         <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">
11229                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
11230                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11231                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11232                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11233                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11234                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
11235                 </fields>
11236                 <links>
11237                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11238                 </links>
11239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11240                         <actions>
11241                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11242                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11243                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11244                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11245                         </actions>
11246                 </permacrud>
11247         </class>
11248
11249         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
11250                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
11251                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11252                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11253                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11254                 </fields>
11255                 <links>
11256                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11257                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11258                 </links>
11259         </class>
11260
11261         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
11262                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
11263                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11264                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11265                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11266                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11267                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11268                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11269                 </fields>
11270                 <links>
11271                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11272                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
11273                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11274                 </links>
11275         </class>
11276
11277         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
11278                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
11279                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11280                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11281                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
11282                 </fields>
11283                 <links>
11284                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11285                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
11286                 </links>
11287         </class>
11288
11289         <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">
11290                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
11291                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11292                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11293                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11294                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11295                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11296                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11297                 </fields>
11298                 <links>
11299                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11300                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
11301                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11302                 </links>
11303         </class>
11304
11305         <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">
11306                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
11307                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
11308                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11309                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
11310                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11311                 </fields>
11312                 <links>
11313                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11314                 </links>
11315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11316             <actions>
11317                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11318                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
11319                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11320                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11321             </actions>
11322                 </permacrud>
11323         </class>
11324
11325         <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">
11326                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
11327                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
11328                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
11329                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
11330                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
11331                 </fields>
11332                 <links>
11333                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
11334                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
11335                 </links>
11336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11337                         <actions>
11338                                 <create permission="ADMIN_CLAIM_POLICY">
11339                                         <context link="claim_policy" field="org_unit"/>
11340                 </create>
11341                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
11342                                         <context link="claim_policy" field="org_unit"/>
11343                 </retrieve>
11344                                 <update permission="ADMIN_CLAIM_POLICY">
11345                                         <context link="claim_policy" field="org_unit"/>
11346                 </update>
11347                                 <delete permission="ADMIN_CLAIM_POLICY">
11348                                         <context link="claim_policy" field="org_unit"/>
11349                 </delete>
11350                         </actions>
11351                 </permacrud>
11352         </class>
11353
11354     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
11355         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
11356             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11357             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
11358             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11359             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
11360             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
11361             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
11362             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
11363             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
11364             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
11365             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
11366             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
11367             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
11368             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
11369             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
11370             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11371             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
11372                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
11373                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
11374                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
11375         </fields>
11376         <links>
11377             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
11378             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11379         </links>
11380     </class>
11381
11382     <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">
11383         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
11384             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11385             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11386             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11387             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11388             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11389         </fields>
11390     </class>
11391
11392     <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">
11393         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11394             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11395             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11396             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11397             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11398             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11399             <field reporter:label="City" name="city" reporter:datatype="text"/>
11400             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11401             <field reporter:label="State" name="state" reporter:datatype="text"/>
11402             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11403             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11404             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11405         </fields>
11406     </class>
11407
11408     <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">
11409         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11410             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11411             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11412             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11413             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11414             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11415             <field reporter:label="City" name="city" reporter:datatype="text"/>
11416             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11417             <field reporter:label="State" name="state" reporter:datatype="text"/>
11418             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11419             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11420             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11421         </fields>
11422     </class>
11423
11424     <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">
11425         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
11426             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11427             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11428             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11429             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
11430             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
11431             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11432         </fields>
11433     </class>
11434
11435     <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">
11436         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
11437             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11438             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11439             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11440             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
11441             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
11442             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11443         </fields>
11444     </class>
11445
11446         <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">
11447                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
11448                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
11449                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11450                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
11451                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
11452                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
11453                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
11454                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
11455                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
11456                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11457                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11458                 </fields>
11459                 <links>
11460                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11461                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11462                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
11463                 </links>
11464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11465                         <actions>
11466                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11467                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11468                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11469                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11470                         </actions>
11471                 </permacrud>
11472         </class>
11473
11474         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
11475                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
11476                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
11477                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
11478                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
11479                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
11480                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
11481                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
11482                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
11483                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
11484                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
11485                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
11486                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
11487                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
11488                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
11489                 </fields>
11490                 <links>
11491                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
11492                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11493                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11494                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
11495                 </links>
11496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11497                         <actions>
11498                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11499                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11500                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11501                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11502                         </actions>
11503                 </permacrud>
11504         </class>
11505
11506         <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">
11507                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
11508                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
11509                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
11510                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
11511                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
11512                 </fields>
11513                 <links>
11514                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
11515                 </links>
11516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
11517                         <actions>
11518                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11519                     <context link="fieldset" field="owning_lib"/>
11520                 </create>
11521                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11522                     <context link="fieldset" field="owning_lib"/>
11523                 </retrieve>
11524                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11525                     <context link="fieldset" field="owning_lib"/>
11526                 </update>
11527                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11528                     <context link="fieldset" field="owning_lib"/>
11529                 </delete>
11530                         </actions>
11531                 </permacrud>
11532         </class>
11533
11534     <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">
11535         <fields>
11536             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11537             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11538             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11539         </fields>
11540                 <links>
11541                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11542                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11543                 </links>
11544     </class>
11545
11546     <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">
11547         <fields>
11548             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11549             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
11550         </fields>
11551                 <links>
11552                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11553                 </links>
11554     </class>
11555
11556     <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">
11557         <fields>
11558             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11559             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11560             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11561         </fields>
11562                 <links>
11563                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11564                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11565                 </links>
11566     </class>
11567
11568     <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">
11569         <fields>
11570             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11571             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
11572         </fields>
11573                 <links>
11574                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11575                 </links>
11576     </class>
11577
11578     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
11579                 <oils_persist:source_definition><![CDATA[
11580
11581             SELECT  DISTINCT l.*
11582               FROM  action.unfulfilled_hold_loops l
11583                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
11584               WHERE l.count = m.max
11585
11586                 ]]></oils_persist:source_definition>
11587         <fields>
11588             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11589             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11590             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11591         </fields>
11592                 <links>
11593                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11594                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11595                 </links>
11596     </class>
11597
11598         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11599                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11600                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11601                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11602                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11603                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11604                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11605                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11606                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11607                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11608                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11609                 </fields>
11610                 <links>
11611                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11612                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11613                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11614                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11615                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11616                 </links>
11617         </class>
11618
11619         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11620                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11621                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11622                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11623                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11624                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11625                 </fields>
11626                 <links>
11627                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11628                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11629                 </links>
11630         </class>
11631
11632         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11633                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11634                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11635                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11636                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11637                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11638                 </fields>
11639                 <links>
11640                 </links>
11641         </class>
11642
11643         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11644                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11645                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11646                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11647                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11648                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11649                 </fields>
11650                 <links>
11651                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11652                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11653                 </links>
11654         </class>
11655         
11656         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11657                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11658                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11659                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11660                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11661                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11662                 </fields>
11663                 <links>
11664                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11665                 </links>
11666         </class>
11667         
11668         <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">
11669                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11670                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11671                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11672                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11673                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11674                 </fields>
11675                 <links>
11676                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11677                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11678                 </links>
11679         </class>
11680
11681         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11682                 <fields oils_persist:primary="name">
11683                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11684                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11685                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11686                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11687                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11688                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11689                 </fields>
11690                 <links>
11691                 </links>
11692         </class>
11693
11694         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11695                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11696                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11697                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11698                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11699                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11700                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11701                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11702                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11703                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11704                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11705                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11706                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11707                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11708                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11709                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11710                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11711                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11712                 </fields>
11713                 <links>
11714                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11715                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11716                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11717                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11718                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11719                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11720                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11721                 </links>
11722         </class>
11723
11724         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11725                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11726                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11727                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11728                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11729                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11730                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11731                 </fields>
11732                 <links>
11733                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11734                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11735                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11736                 </links>
11737         </class>
11738
11739         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11740                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11741                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11742                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11743                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11744                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11745                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11746                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11747                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11748                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11749                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11750                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11751                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11752                 </fields>
11753                 <links>
11754                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11755                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11756                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11757                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11758                 </links>
11759         </class>
11760
11761         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11762                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11763                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11764                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11765                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11766                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11767                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11768                 </fields>
11769                 <links>
11770                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11771                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11772                 </links>
11773         </class>
11774
11775         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11776                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11777                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11778                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11779                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11780                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11781                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11782                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11783                 </fields>
11784                 <links>
11785                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11786                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11787                 </links>
11788         </class>
11789
11790         <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">
11791                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11792                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11793                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11794                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11795                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11796                 </fields>
11797                 <links>
11798                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11799                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11800                 </links>
11801         </class>
11802
11803         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11804                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11805                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11806                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11807                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11808                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11809                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11810                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11811                 </fields>
11812                 <links>
11813                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11814                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11815                 </links>
11816         </class>
11817
11818         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11819                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11820                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11821                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11822                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11823                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11824                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11825                 </fields>
11826                 <links>
11827                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11828                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11829                 </links>
11830         </class>
11831
11832         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11833                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11834                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11835                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11836                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11837                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11838                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11839                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11840                 </fields>
11841                 <links>
11842                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11843                 </links>
11844         </class>
11845
11846         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11847                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11848                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11849                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11850                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11851                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11852                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11853                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11854                 </fields>
11855                 <links>
11856                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11857                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11858                 </links>
11859         </class>
11860
11861         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11862                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11863                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11864                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11865                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11866                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11867                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11868                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11869                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11870                 </fields>
11871                 <links>
11872                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11873                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11874                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11875                 </links>
11876         </class>
11877
11878         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11879                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11880                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11881                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11882                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11883                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11884                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11885                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11886                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11887                 </fields>
11888                 <links>
11889                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11890                 </links>
11891         </class>
11892
11893         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11894                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11895                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11896                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11897                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11898                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11899                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11900                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11901                 </fields>
11902                 <links>
11903                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11904                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11905                 </links>
11906         </class>
11907
11908         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11909                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11910                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11911                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11912                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11913                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11914                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11915                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11916                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11917                 </fields>
11918                 <links>
11919                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11920                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11921                 </links>
11922         </class>
11923
11924         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11925                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11926                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11927                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11928                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11929                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11930                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11931                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11932                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11933                 </fields>
11934                 <links>
11935                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11936                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11937                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11938                 </links>
11939         </class>
11940
11941         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11942                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11943                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11944                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11945                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11946                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11947                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11948                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11949                 </fields>
11950                 <links>
11951                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11952                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11953                 </links>
11954         </class>
11955
11956         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11957                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11958                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11959                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11960                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11961                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11962                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11963                 </fields>
11964                 <links>
11965                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11966                 </links>
11967         </class>
11968
11969         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11970                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11971                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11972                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11973                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11974                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11975                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11976                 </fields>
11977                 <links>
11978                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11979                 </links>
11980         </class>
11981
11982         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11983                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11984                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11985                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11986                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11987                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11988                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11989                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11990                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11991                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11992                 </fields>
11993                 <links>
11994                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11995                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11996                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11997                 </links>
11998         </class>
11999
12000         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
12001                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
12002                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
12003                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
12004                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
12005                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
12006                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
12007                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
12008                 </fields>
12009                 <links>
12010                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
12011                 </links>
12012         </class>
12013
12014         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
12015                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
12016                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
12017                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
12018                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
12019                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
12020                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
12021                 </fields>
12022                 <links>
12023                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
12024                 </links>
12025         </class>
12026
12027         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
12028                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
12029                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
12030                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
12031                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
12032                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
12033                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
12034                 </fields>
12035                 <links>
12036                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
12037                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
12038                 </links>
12039         </class>
12040
12041         <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">
12042                 <fields oils_persist:primary="id">
12043                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
12044                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
12045                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
12046                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
12047                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
12048                 </fields>
12049                 <links>
12050                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
12051                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
12052                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
12053                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
12054                 </links>
12055         </class>
12056
12057         <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">
12058                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
12059                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12060                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
12061                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12062                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
12063                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
12064                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12065                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
12066                 </fields>
12067                 <links/>
12068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12069                         <actions>
12070                                 <retrieve/>
12071                         </actions>
12072                 </permacrud>
12073         </class>
12074
12075         <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">
12076                 <fields oils_persist:primary="ptype_key">
12077                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
12078                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12079                 </fields>
12080                 <links/>
12081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12082                         <actions>
12083                                 <retrieve/>
12084                         </actions>
12085                 </permacrud>
12086         </class>
12087
12088         <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">
12089                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
12090                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12091                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
12092                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12093                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
12094                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12095                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12096                 </fields>
12097                 <links>
12098                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
12099                 </links>
12100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12101                         <actions>
12102                                 <retrieve/>
12103                         </actions>
12104                 </permacrud>
12105         </class>
12106
12107         <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">
12108                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
12109                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12110                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12111                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
12112                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12113                 </fields>
12114                 <links>
12115                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
12116                 </links>
12117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12118                         <actions>
12119                                 <retrieve/>
12120                         </actions>
12121                 </permacrud>
12122         </class>
12123
12124     <class
12125         id="uvs"
12126         controller="open-ils.cstore open-ils.pcrud"
12127         oils_obj:fieldmapper="url_verify::session"
12128         oils_persist:tablename="url_verify.session"
12129         reporter:label="URL Verification Session"
12130     >
12131         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
12132             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
12133             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
12134                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
12135             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
12136             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
12137             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12138             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
12139             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
12140             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
12141         </fields>
12142
12143         <links>
12144             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12145             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12146             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
12147             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
12148             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
12149         </links>
12150
12151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12152             <actions>
12153                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
12154             </actions>
12155         </permacrud>
12156
12157     </class>
12158
12159     <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">
12160         <oils_persist:source_definition><![CDATA[
12161             SELECT
12162                 cbrebi.id AS id,  -- so we can have a pkey in our view
12163                 uvs.id AS session,
12164                 uvs.owning_lib,
12165                 cbrebi.target_biblio_record_entry
12166             FROM url_verify.session uvs
12167             JOIN container.biblio_record_entry_bucket cbreb
12168                 ON (uvs.container = cbreb.id)
12169             JOIN container.biblio_record_entry_bucket_item cbrebi
12170                 ON (cbrebi.bucket = cbreb.id)
12171         ]]></oils_persist:source_definition>
12172         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
12173             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
12174             <field reporter:label="Session" name="session" reporter:datatype="link" />
12175             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
12176             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
12177         </fields>
12178         <links>
12179             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
12180             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
12181             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
12182         </links>
12183         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12184             <actions>
12185                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
12186             </actions>
12187         </permacrud>
12188     </class>
12189
12190     <class
12191         id="uvus"
12192         controller="open-ils.cstore open-ils.pcrud"
12193         oils_obj:fieldmapper="url_verify::url_selector"
12194         oils_persist:tablename="url_verify.url_selector"
12195         reporter:label="URL Verification URL Selector"
12196     >
12197         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
12198             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
12199             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
12200                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12201             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
12202         </fields>
12203
12204         <links>
12205             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12206             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
12207         </links>
12208
12209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12210             <actions>
12211                 <create permission="URL_VERIFY">
12212                     <context link="session" field="owning_lib"/>
12213                 </create>
12214                 <retrieve permission="URL_VERIFY">
12215                     <context link="session" field="owning_lib"/>
12216                 </retrieve>
12217                 <update permission="URL_VERIFY">
12218                     <context link="session" field="owning_lib"/>
12219                 </update>
12220                 <delete permission="URL_VERIFY">
12221                     <context link="session" field="owning_lib"/>
12222                 </delete>
12223             </actions>
12224         </permacrud>
12225
12226     </class>
12227
12228     <class
12229         id="uvu"
12230         controller="open-ils.cstore open-ils.pcrud"
12231         oils_obj:fieldmapper="url_verify::url"
12232         oils_persist:tablename="url_verify.url"
12233         reporter:label="URL Verification URL"
12234     >
12235         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
12236             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
12237                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
12238                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
12239                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12240                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
12241             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12242             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12243             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
12244             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
12245             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
12246             <field reporter:label="Host" name="host" reporter:datatype="text"/>
12247             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
12248             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
12249             <field reporter:label="Path" name="path" reporter:datatype="text"/>
12250             <field reporter:label="Page" name="page" reporter:datatype="text"/>
12251             <field reporter:label="Query" name="query" reporter:datatype="text"/>
12252             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
12253             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
12254         </fields>
12255
12256         <links>
12257             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
12258             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
12259             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12260             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
12261             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
12262         </links>
12263
12264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12265             <actions>
12266                 <create permission="URL_VERIFY">
12267                     <context link="session" field="owning_lib"/>
12268                 </create>
12269                 <retrieve permission="URL_VERIFY">
12270                     <context link="session" field="owning_lib"/>
12271                 </retrieve>
12272                 <update permission="URL_VERIFY">
12273                     <context link="session" field="owning_lib"/>
12274                 </update>
12275                 <delete permission="URL_VERIFY">
12276                     <context link="session" field="owning_lib"/>
12277                 </delete>
12278             </actions>
12279         </permacrud>
12280
12281     </class>
12282
12283     <class
12284         id="uvva"
12285         controller="open-ils.cstore open-ils.pcrud"
12286         oils_obj:fieldmapper="url_verify::verification_attempt"
12287         oils_persist:tablename="url_verify.verification_attempt"
12288         reporter:label="URL Verification Attempt"
12289     >
12290         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
12291             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
12292                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
12293                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
12294             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
12295             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
12296         </fields>
12297
12298         <links>
12299             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12300             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12301         </links>
12302
12303         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12304             <actions>
12305                 <create permission="URL_VERIFY">
12306                     <context link="session" field="owning_lib"/>
12307                 </create>
12308                 <retrieve permission="URL_VERIFY">
12309                     <context link="session" field="owning_lib"/>
12310                 </retrieve>
12311                 <update permission="URL_VERIFY">
12312                     <context link="session" field="owning_lib"/>
12313                 </update>
12314                 <delete permission="URL_VERIFY">
12315                     <context link="session" field="owning_lib"/>
12316                 </delete>
12317             </actions>
12318         </permacrud>
12319
12320     </class>
12321
12322     <class
12323         id="uvuv"
12324         controller="open-ils.cstore open-ils.pcrud"
12325         oils_obj:fieldmapper="url_verify::url_verification"
12326         oils_persist:tablename="url_verify.url_verification"
12327         reporter:label="URL Verification"
12328     >
12329         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
12330             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
12331                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
12332                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
12333             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
12334             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
12335             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
12336             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
12337                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
12338         </fields>
12339
12340         <links>
12341             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
12342             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
12343             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
12344         </links>
12345
12346         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12347             <actions>
12348                 <create permission="URL_VERIFY">
12349                     <context link="attempt" jump="session" field="owning_lib"/>
12350                 </create>
12351                 <retrieve permission="URL_VERIFY">
12352                     <context link="attempt" jump="session" field="owning_lib"/>
12353                 </retrieve>
12354                 <update permission="URL_VERIFY">
12355                     <context link="attempt" jump="session" field="owning_lib"/>
12356                 </update>
12357                 <delete permission="URL_VERIFY">
12358                     <context link="attempt" jump="session" field="owning_lib"/>
12359                 </delete>
12360             </actions>
12361         </permacrud>
12362
12363     </class>
12364
12365         <class
12366                 id="cfdi"
12367                 controller="open-ils.cstore open-ils.pcrud"
12368                 oils_obj:fieldmapper="config::filter_dialog_interface"
12369                 oils_persist:tablename="config.filter_dialog_interface"
12370                 reporter:label="FilterDialog Interface">
12371                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
12372                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
12373                         <field reporter:label="Description" name="description" reporter:datatype="text" />
12374                 </fields>
12375                 <links>
12376                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
12377                 </links>
12378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12379                         <actions>
12380                                 <retrieve />
12381                         </actions>
12382                 </permacrud>
12383         </class>
12384
12385         <class
12386                 id="cfdfs"
12387                 controller="open-ils.cstore open-ils.pcrud"
12388                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
12389                 oils_persist:tablename="config.filter_dialog_filter_set"
12390                 reporter:label="FilterDialog Filter Set">
12391                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
12392                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12393                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12394                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12395                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12396                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
12397                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12398                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
12399                 </fields>
12400                 <links>
12401                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12402                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12403                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
12404                 </links>
12405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12406                         <actions>
12407                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12408                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12409                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12410                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12411                         </actions>
12412                 </permacrud>
12413
12414         </class>
12415
12416         <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">
12417                 <fields oils_persist:primary="code">
12418                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
12419                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
12420                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
12421                 </fields>
12422                 <links/>
12423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12424                         <actions>
12425                                 <retrieve/>
12426                         </actions>
12427                 </permacrud>
12428         </class>
12429
12430         <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">
12431                 <oils_persist:source_definition><![CDATA[
12432
12433             SELECT  b.id,
12434                     MAX(dcp.edit_date) AS last_delete_date
12435              FROM   biblio.record_entry b
12436                     JOIN asset.call_number cn ON (cn.record = b.id)
12437                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
12438              WHERE  NOT b.deleted
12439              GROUP BY b.id
12440              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
12441
12442                 ]]></oils_persist:source_definition>
12443                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12444                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12445                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
12446                 </fields>
12447                 <links>
12448                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12449                 </links>
12450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12451                         <actions>
12452                                 <retrieve/>
12453                         </actions>
12454                 </permacrud>
12455         </class>
12456
12457         <class id="jubstlbl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::li_state_label" oils_persist:tablename="acq.li_state_label" oils_persist:readonly="true" reporter:label="Line Item State Labels" oils_persist:field_safe="true">
12458                 <fields oils_persist:primary="id">
12459                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12460                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12461                 </fields>
12462                 <links/>
12463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12464                         <actions>
12465                                 <retrieve/>
12466                         </actions>
12467                 </permacrud>
12468         </class>
12469
12470         <class id="acqpostlbl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_state_label" oils_persist:tablename="acq.po_state_label" oils_persist:readonly="true" reporter:label="PO State Labels">
12471                 <fields oils_persist:primary="id">
12472                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12473                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12474                 </fields>
12475                 <links/>
12476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12477                         <actions>
12478                                 <retrieve/>
12479                         </actions>
12480                 </permacrud>
12481         </class>
12482
12483
12484         <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">
12485                 <oils_persist:source_definition><![CDATA[
12486                 SELECT
12487                     x.id,
12488                     COALESCE( y.copy_count, 0 ) AS copy_count,
12489                     x.hold_count AS hold_count,
12490                     CASE WHEN y.copy_count = 0 THEN 'Infinity'::FLOAT ELSE x.hold_count::FLOAT/y.copy_count::FLOAT END AS hold_copy_ratio
12491                 FROM
12492                     (SELECT bib_record as id, count(DISTINCT ahr.id) AS hold_count
12493                         FROM
12494                             action.hold_request ahr
12495                             JOIN reporter.hold_request_record rhrr USING (id)
12496                         WHERE
12497                             ahr.cancel_time IS NULL
12498                             AND ahr.fulfillment_time IS NULL
12499                         GROUP BY bib_record
12500                     )x
12501                     JOIN
12502                     (SELECT bib_record as id, COALESCE(count(DISTINCT target_copy),0) as copy_count
12503                         FROM
12504                             action.hold_request ahr
12505                             JOIN reporter.hold_request_record rhrr USING (id)
12506                             LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12507                         WHERE
12508                             ahr.cancel_time IS NULL
12509                             AND ahr.fulfillment_time IS NULL
12510                             AND ahr.capture_time IS NULL
12511                             AND ahr.frozen IS FALSE
12512                             -- Comment out the next line to count copies included from other bibs by metarecord holds
12513                             AND ahr.hold_type != 'M'
12514                            GROUP BY bib_record
12515                     )y
12516                     USING (id)
12517                 ]]></oils_persist:source_definition>
12518                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12519                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12520                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
12521                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
12522                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
12523                 </fields>
12524                 <links>
12525                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12526                 </links>
12527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12528                         <actions>
12529                                 <retrieve/>
12530                         </actions>
12531                 </permacrud>
12532         </class>
12533
12534         <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">
12535                 <oils_persist:source_definition><![CDATA[
12536             SELECT *,
12537                 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,
12538                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
12539             FROM
12540                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library
12541                     FROM
12542                         action.hold_request ahr
12543                         JOIN reporter.hold_request_record rhrr USING (id)
12544                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12545                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
12546                     WHERE
12547                         ahr.cancel_time IS NULL
12548                         AND ahr.fulfillment_time IS NULL
12549                     GROUP BY bib_record, pickup_lib
12550                 )x
12551                 JOIN
12552                 (SELECT bib_record as id, pickup_lib, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
12553                     FROM
12554                         action.hold_request ahr
12555                         JOIN reporter.hold_request_record rhrr USING (id)
12556                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12557                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
12558                     WHERE
12559                         ahr.cancel_time IS NULL
12560                         AND ahr.fulfillment_time IS NULL
12561                         AND ahr.capture_time IS NULL
12562                         AND ahr.frozen IS FALSE
12563                         -- Comment out the next line to count copies included from other bibs by metarecord holds
12564                         AND ahr.hold_type != 'M'
12565                     GROUP BY bib_record, pickup_lib
12566                 )y
12567                 USING(id,pickup_lib)
12568                 JOIN
12569                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere
12570                     FROM
12571                         action.hold_request ahr
12572                         JOIN reporter.hold_request_record rhrr USING (id)
12573                     WHERE
12574                         ahr.cancel_time IS NULL
12575                         AND ahr.fulfillment_time IS NULL
12576                     GROUP BY bib_record
12577                 )z
12578                 USING (id)
12579                 JOIN
12580                 (SELECT bib_record as id, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12581                     FROM
12582                         action.hold_request ahr
12583                         JOIN reporter.hold_request_record rhrr USING (id)
12584                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12585                     WHERE
12586                         ahr.cancel_time IS NULL
12587                         AND ahr.fulfillment_time IS NULL
12588                         AND ahr.capture_time IS NULL
12589                         AND ahr.frozen IS FALSE
12590                         -- Comment out the next line to count copies included from other bibs by metarecord holds
12591                         AND ahr.hold_type != 'M'
12592                         GROUP BY bib_record
12593                 )u
12594                 USING (id)
12595                 ]]></oils_persist:source_definition>
12596                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12597                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12598                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
12599                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
12600                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
12601                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12602                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12603                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
12604                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12605                 </fields>
12606                 <links>
12607                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12608                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
12609                 </links>
12610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12611                         <actions>
12612                                 <retrieve/>
12613                         </actions>
12614                 </permacrud>
12615         </class>
12616
12617         <class id="rhcrpbah" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_home" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Home Library">
12618                 <oils_persist:source_definition><![CDATA[
12619             SELECT *,
12620                 CASE WHEN copy_count_at_home_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_home_library::FLOAT/copy_count_at_home_library END AS home_library_ratio,
12621                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
12622             FROM
12623                 (SELECT bib_record as id, home_ou, count(DISTINCT ahr.id) AS holds_at_home_library
12624                     FROM
12625                         action.hold_request ahr
12626                         JOIN actor.usr au ON (ahr.usr = au.id)
12627                         JOIN reporter.hold_request_record rhrr ON (rhrr.id = ahr.id)
12628                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12629                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND au.home_ou = ac.circ_lib)
12630                     WHERE
12631                         ahr.cancel_time IS NULL
12632                         AND ahr.fulfillment_time IS NULL
12633                     GROUP BY bib_record, home_ou
12634                 )x
12635                 JOIN
12636                 (SELECT bib_record as id, home_ou, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_home_library
12637                     FROM
12638                         action.hold_request ahr
12639                         JOIN actor.usr au ON (ahr.usr = au.id)
12640                         JOIN reporter.hold_request_record rhrr ON (rhrr.id = ahr.id)
12641                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12642                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND au.home_ou = ac.circ_lib)
12643                     WHERE
12644                         ahr.cancel_time IS NULL
12645                         AND ahr.fulfillment_time IS NULL
12646                         AND ahr.capture_time IS NULL
12647                         AND ahr.frozen IS FALSE
12648                         -- Comment out the next line to count copies included from other bibs by metarecord holds
12649                         AND ahr.hold_type != 'M'
12650                     GROUP BY bib_record, home_ou
12651                 )y
12652                 USING (id,home_ou)
12653                 JOIN
12654                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere
12655                     FROM
12656                         action.hold_request ahr
12657                         JOIN reporter.hold_request_record rhrr USING (id)
12658                     WHERE
12659                         ahr.cancel_time IS NULL
12660                         AND ahr.fulfillment_time IS NULL
12661                     GROUP BY bib_record
12662                 )z
12663                 USING (id)
12664                 JOIN
12665                 (SELECT bib_record as id, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12666                     FROM
12667                         action.hold_request ahr
12668                         JOIN reporter.hold_request_record rhrr USING (id)
12669                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12670                     WHERE
12671                         ahr.cancel_time IS NULL
12672                         AND ahr.fulfillment_time IS NULL
12673                         AND ahr.capture_time IS NULL
12674                         AND ahr.frozen IS FALSE
12675                         -- Comment out the next line to count copies included from other bibs by metarecord holds
12676                         AND ahr.hold_type != 'M'
12677                     GROUP BY bib_record
12678                 )u
12679                 USING (id)
12680         ]]></oils_persist:source_definition>
12681         <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12682                 <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12683                 <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12684                 <field reporter:label="Active Holds at Home Library" name="holds_at_home_library" reporter:datatype="int"/>
12685                 <field reporter:label="Holdable Copy Count at Home Library" name="copy_count_at_home_library" reporter:datatype="int"/>
12686                 <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12687                 <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12688                 <field reporter:label="Hold/Copy Ratio at Home Library" name="home_library_ratio" reporter:datatype="float"/>
12689                 <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12690         </fields>
12691         <links>
12692                 <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12693                 <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12694         </links>
12695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12696                 <actions>
12697                         <retrieve/>
12698                 </actions>
12699         </permacrud>
12700 </class>
12701
12702         <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) ">
12703                 <oils_persist:source_definition><![CDATA[
12704                 WITH counts_at_ou AS (
12705                 SELECT a.id, a.pickup_lib_or_desc, a.holds_at_or_below, b.copy_count_at_or_below
12706                 FROM
12707                     (SELECT rhrr.bib_record AS id,
12708                             aou.id AS pickup_lib_or_desc,
12709                             COUNT(DISTINCT ahr.id) AS holds_at_or_below
12710                        FROM actor.org_unit aou
12711                             JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12712                             action.hold_request ahr
12713                             JOIN reporter.hold_request_record rhrr USING (id)
12714                             LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12715                             LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12716                       WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12717                             AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12718                             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
12719                       GROUP BY 1, 2
12720                 ) a
12721                 JOIN
12722                     (SELECT rhrr.bib_record AS id,
12723                             aou.id AS pickup_lib_or_desc,
12724                             COALESCE(COUNT(DISTINCT ahcm.target_copy),0) AS copy_count_at_or_below
12725                        FROM actor.org_unit aou
12726                             JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12727                             action.hold_request ahr
12728                             JOIN reporter.hold_request_record rhrr USING (id)
12729                             LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12730                             LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12731                       WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL AND ahr.capture_time IS NULL AND NOT ahr.frozen
12732                             -- Comment out the next line to count copies included from other bibs by metarecord holds
12733                             AND ahr.hold_type != 'M'
12734                             AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12735                             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
12736                       GROUP BY 1, 2
12737                 ) b
12738                 USING (id,pickup_lib_or_desc)
12739             )
12740             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12741                    y.holds_everywhere, z.copy_count_everywhere,
12742                 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,
12743                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/z.copy_count_everywhere END AS everywhere_ratio
12744             FROM counts_at_ou x
12745                 JOIN
12746                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere
12747                     FROM
12748                         action.hold_request ahr
12749                         JOIN reporter.hold_request_record rhrr USING (id)
12750                     WHERE
12751                         ahr.cancel_time IS NULL
12752                         AND ahr.fulfillment_time IS NULL
12753                     GROUP BY bib_record
12754                 )y
12755                 USING (id)
12756                 JOIN
12757                 (SELECT bib_record as id, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12758                     FROM
12759                         action.hold_request ahr
12760                         JOIN reporter.hold_request_record rhrr USING (id)
12761                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12762                     WHERE
12763                         ahr.cancel_time IS NULL
12764                         AND ahr.fulfillment_time IS NULL
12765                         AND ahr.capture_time IS NULL
12766                         AND ahr.frozen IS FALSE
12767                         -- Comment out the next line to count copies included from other bibs by metarecord holds
12768                         AND ahr.hold_type != 'M'
12769                         GROUP BY bib_record
12770                 )z
12771                 USING (id)
12772                 ]]></oils_persist:source_definition>
12773                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12774                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12775                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12776                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12777                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12778                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12779                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12780                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12781                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12782                 </fields>
12783                 <links>
12784                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12785                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12786                 </links>
12787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12788                         <actions>
12789                                 <retrieve/>
12790                         </actions>
12791                 </permacrud>
12792         </class>
12793
12794         <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">
12795                 <oils_persist:source_definition><![CDATA[
12796             SELECT
12797                 ac.id,
12798                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12799                 MAX(actac.xact_start) AS last_circ
12800             FROM asset.copy ac
12801                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12802             GROUP BY ac.id
12803
12804             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12805             --SELECT
12806             --    ac.id,
12807             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12808             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12809             --FROM asset.copy ac
12810             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12811             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12812             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12813                 ]]></oils_persist:source_definition>
12814                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12815                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12816                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12817                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12818                 </fields>
12819                 <links>
12820                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12821                 </links>
12822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12823                         <actions>
12824                                 <retrieve/>
12825                         </actions>
12826                 </permacrud>
12827         </class>
12828
12829         <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">
12830                 <fields oils_persist:primary="id">
12831                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12832                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12833                 </fields>
12834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12835                         <actions>
12836                                 <retrieve/>
12837                         </actions>
12838                 </permacrud>
12839         </class>
12840
12841         <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">
12842                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12843                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12844                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12845                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12846                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12847                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12848                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12849                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12850                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12851                 </fields>
12852                 <links>
12853                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12854                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12855                 </links>
12856                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12857                         <actions>
12858                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12859                                 <retrieve/>
12860                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12861                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12862                         </actions>
12863                 </permacrud>
12864         </class>
12865
12866         <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">
12867                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12868                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12869                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12870                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12871                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12872                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12873                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12874                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12875                 </fields>
12876                 <links>
12877                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12878                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12879                 </links>
12880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12881                         <actions>
12882                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12883                                 <retrieve/>
12884                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12885                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12886                         </actions>
12887                 </permacrud>
12888         </class>
12889
12890
12891         <!-- ********************************************************************************************************************* -->
12892         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12893         <!-- ********************************************************************************************************************* -->
12894         <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">
12895                 <fields oils_persist:primary="id">
12896                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12897                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12898                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12899                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12900                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12901                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12902                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12903                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12904                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12905                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12906                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12907                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12908                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12909                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12910                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12911                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12912                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12913                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12914                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12915                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12916                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12917                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12918                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12919                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12920                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12921                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12922                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12923                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12924                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12925                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12926                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12927                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12928                 </fields>
12929                 <links>
12930                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12931                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12932                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12933                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12934                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12935                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12936                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12937                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12938                 </links>
12939         </class>
12940
12941         <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">
12942                 <fields oils_persist:primary="id">
12943                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12944                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12945                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12946                 </fields>
12947                 <links>
12948                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12949                 </links>
12950         </class>
12951
12952         <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">
12953                 <fields oils_persist:primary="id">
12954                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12955                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12956                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12957                 </fields>
12958                 <links>
12959                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12960                 </links>
12961         </class>
12962
12963         <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">
12964                 <fields oils_persist:primary="id">
12965                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12966
12967                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12968                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12969                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12970
12971                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12972                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12973                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12974
12975                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12976                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12977
12978                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12979                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12980                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12981
12982                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12983                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12984
12985                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12986                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12987                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12988
12989                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12990                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12991                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12992
12993                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12994                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12995                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12996                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12997
12998                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12999                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
13000
13001                 </fields>
13002                 <links>
13003                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
13004                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
13005                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
13006                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
13007                 </links>
13008         </class>
13009
13010         <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">
13011                 <oils_persist:source_definition><![CDATA[
13012
13013             SELECT
13014                 po.ordering_agency AS ordering_agency,
13015                 po.id AS purchase_order,
13016                 li.id AS lineitem,
13017                 lid.id AS lineitem_detail,
13018                 cpa.id AS claim_policy_action
13019             FROM
13020                 acq.lineitem_detail lid
13021                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
13022                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
13023                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
13024                 JOIN acq.claim_policy_action cpa ON (
13025                     cpa.claim_policy = cp.id
13026
13027                     -- we only care about claim policy actions whose claim
13028                     -- interval we'd reached or exceeded
13029                     AND (NOW() - cpa.action_interval) > po.order_date
13030
13031                     -- filter out all claim policy actions where claim events
13032                     -- have occurred on or after the action's action_interval
13033                     AND NOT EXISTS (
13034                         SELECT 1
13035                         FROM
13036                             acq.claim_event evt
13037                             JOIN acq.claim claim ON (
13038                                 claim.id = evt.claim
13039                                 AND claim.lineitem_detail = lid.id
13040                             )
13041                         WHERE
13042                             evt.event_date >= (po.order_date + cpa.action_interval)
13043                     )
13044                 )
13045             WHERE
13046                 lid.cancel_reason IS NULL
13047                 AND li.cancel_reason IS NULL -- belt/suspenders
13048                 AND po.cancel_reason IS NULL -- belt/suspenders
13049                 AND lid.recv_time IS NULL
13050                 AND po.state = 'on-order'
13051             ORDER BY 1, 2, 3, 4, 5
13052
13053                 ]]></oils_persist:source_definition>
13054                 <fields>
13055                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
13056                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
13057                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
13058                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
13059                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
13060                 </fields>
13061                 <links>
13062                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
13063                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
13064                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
13065                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
13066                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
13067                 </links>
13068         </class>
13069         <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">
13070                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
13071                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
13072                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
13073                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
13074                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
13075                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
13076                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
13077                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
13078                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
13079                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
13080                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
13081                 </fields>
13082                 <links>
13083                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
13084                 </links>
13085     </class>
13086         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
13087                 <oils_persist:source_definition><![CDATA[
13088             SELECT * FROM acq.lineitem_summary 
13089                                 WHERE item_count > (invoice_count + cancel_count)
13090         ]]></oils_persist:source_definition>
13091                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
13092                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
13093                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
13094                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
13095                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
13096                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
13097                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
13098                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
13099                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
13100                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
13101                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
13102                 </fields>
13103                 <links>
13104                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
13105                 </links>
13106     </class>
13107         <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">
13108                 <oils_persist:source_definition><![CDATA[
13109
13110                         SELECT  t.*
13111                           FROM  action.transit_copy t
13112                                 JOIN actor.org_unit AS s ON (t.source = s.id)
13113                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
13114                           WHERE s.parent_ou <> d.parent_ou
13115
13116                 ]]></oils_persist:source_definition>
13117                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
13118                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
13119                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
13120                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
13121                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
13122                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
13123                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
13124                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
13125                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
13126                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
13127                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
13128                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
13129                 </fields>
13130                 <links>
13131                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
13132                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
13133                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
13134                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
13135                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
13136                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
13137                 </links>
13138         </class>
13139
13140     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
13141                 <oils_persist:source_definition><![CDATA[
13142
13143         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
13144                 SELECT
13145                         cp.id as copy,
13146                         COUNT(circ.id),
13147                         EXTRACT(YEAR FROM circ.xact_start) AS year,
13148                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
13149                 FROM
13150                         asset.copy cp
13151                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
13152                 GROUP BY 1, 3, 4
13153                 UNION ALL
13154                 SELECT
13155                         cp.id as copy,
13156                         COUNT(circ.id),
13157                         EXTRACT(YEAR FROM circ.xact_start) AS year,
13158                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
13159                 FROM
13160                         asset.copy cp
13161                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
13162                 GROUP BY 1, 3, 4
13163                 UNION ALL
13164                 SELECT
13165                         id as copy,
13166                         circ_count,
13167                         -1 AS year,
13168                         false as is_renewal
13169                 FROM
13170                         extend_reporter.legacy_circ_count
13171         )x GROUP BY 1, 3, 4
13172
13173                 ]]></oils_persist:source_definition>
13174         <fields>
13175             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
13176             <field reporter:label="Count" name="count" reporter:datatype="int"/>
13177             <field reporter:label="Year" name="year" reporter:datatype="int"/>
13178             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
13179         </fields>
13180                 <links>
13181                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13182                 </links>
13183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13184                         <actions>
13185                                 <retrieve/>
13186                         </actions>
13187                 </permacrud>
13188     </class>
13189
13190         <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">
13191                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
13192                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
13193                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
13194                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
13195                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
13196                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
13197                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
13198                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
13199                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
13200                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
13201                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
13202                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
13203                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
13204                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
13205                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
13206                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
13207                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
13208                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
13209                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
13210                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
13211                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
13212                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
13213                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
13214                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
13215                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
13216                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
13217                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
13218                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
13219                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
13220                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
13221                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
13222                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
13223                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
13224                 </fields>
13225                 <links>
13226                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
13227                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
13228                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
13229                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
13230                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
13231                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
13232                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13233                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
13234                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
13235                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
13236                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
13237                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
13238                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
13239                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
13240                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
13241                 </links>
13242         </class>
13243
13244     <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">
13245         <fields oils_persist:primary="id">
13246             <field reporter:label="Title" name="title" reporter:datatype="text"/>
13247             <field reporter:label="Author" name="author" reporter:datatype="text"/>
13248             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
13249             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13250             <field reporter:label="Price" name="price" reporter:datatype="money"/>
13251             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
13252             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
13253             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
13254             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
13255             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
13256             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
13257             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
13258             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
13259             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
13260             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
13261             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
13262             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
13263             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
13264             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
13265             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
13266             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
13267             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
13268             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
13269             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
13270             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
13271             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
13272             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
13273             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
13274             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
13275             <field reporter:label="Status" name="status" reporter:datatype="link"/>
13276             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
13277             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
13278             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
13279             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
13280         </fields>
13281         <links>
13282             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13283             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
13284             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13285             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13286             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
13287             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
13288             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
13289             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
13290         </links>
13291     </class>
13292
13293     <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">
13294         <fields oils_persist:primary="id">
13295             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13296             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13297             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13298             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13299         </fields>
13300         <links>
13301             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13302             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13303         </links>
13304     </class>
13305
13306     <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">
13307         <fields oils_persist:primary="owning_lib">
13308             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13309             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13310             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13311         </fields>
13312         <links>
13313             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13314         </links>
13315     </class>
13316
13317     <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">
13318         <fields oils_persist:primary="id">
13319             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13320             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13321             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13322             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13323             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13324         </fields>
13325         <links>
13326             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13327             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13328             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13329         </links>
13330     </class>
13331
13332     <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">
13333         <fields oils_persist:primary="circ_lib">
13334             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13335             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13336             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13337             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13338         </fields>
13339         <links>
13340             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13341             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13342         </links>
13343     </class>
13344
13345     <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">
13346         <fields oils_persist:primary="id">
13347             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13348             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13349             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13350             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13351             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13352         </fields>
13353         <links>
13354             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13355             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13356             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13357         </links>
13358     </class>
13359
13360     <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">
13361         <fields oils_persist:primary="home_ou">
13362             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13363             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13364             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13365             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13366         </fields>
13367         <links>
13368             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13369             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13370         </links>
13371     </class>
13372         <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">
13373                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
13374                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
13375                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13376                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13377                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
13378                 </fields>
13379                 <links>
13380                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13381                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
13382                 </links>
13383                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13384                         <actions>
13385                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13386                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
13387                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13388                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13389                         </actions>
13390                 </permacrud>
13391         </class>
13392         <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">
13393                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
13394                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
13395                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
13396                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
13397                 </fields>
13398                 <links>
13399                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
13400                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
13401                         </links>
13402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13403                 <actions>
13404                                 <create permission="ADMIN_ACQ_FUND_TAG">
13405                                         <context link="tag" field="owner"/>
13406                                 </create>
13407                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
13408                                         <context link="tag" field="owner"/>
13409                                 </retrieve>
13410                                 <update permission="ADMIN_ACQ_FUND_TAG">
13411                                         <context link="tag" field="owner"/>
13412                                 </update>
13413                                 <delete permission="ADMIN_ACQ_FUND_TAG">
13414                                         <context link="tag" field="owner"/>
13415                                 </delete>
13416                         </actions>
13417                 </permacrud>
13418         </class>
13419         <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">
13420                 <oils_persist:source_definition><![CDATA[
13421                 SELECT
13422                         poi.purchase_order AS purchase_order,
13423                         ii.invoice AS invoice,
13424                         NULL AS lineitem,
13425                         poi.id AS po_item,
13426                         NULL AS picklist
13427                 FROM
13428                         acq.po_item poi
13429                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
13430                 UNION SELECT
13431                         jub.purchase_order AS purchase_order,
13432                         ie.invoice AS invoice,
13433                         jub.id AS lineitem,
13434                         NULL AS po_item,
13435                         jub.picklist AS picklist
13436                 FROM
13437                         acq.lineitem jub
13438                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
13439                 UNION SELECT
13440                         ii.purchase_order AS purchase_order,
13441                         ii.invoice AS invoice,
13442                         NULL AS lineitem,
13443                         NULL AS po_item,
13444                         NULL AS picklist
13445                 FROM
13446                         acq.invoice_item ii
13447                 WHERE ii.po_item IS NULL
13448                 UNION SELECT
13449                         ie.purchase_order AS purchase_order,
13450                         ie.invoice AS invoice,
13451                         NULL AS lineitem,
13452                         NULL AS po_item,
13453                         NULL AS picklist
13454                 FROM
13455                         acq.invoice_entry ie
13456                 WHERE ie.lineitem IS NULL
13457                 UNION SELECT
13458                         NULL AS purchase_order,
13459                         NULL AS invoice,
13460                         jub.id AS lineitem,
13461                         NULL AS po_item,
13462                         jub.picklist AS picklist
13463                 FROM
13464                         acq.lineitem jub
13465                 WHERE jub.purchase_order IS NULL
13466                 ]]></oils_persist:source_definition>
13467                 <fields>
13468                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
13469                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
13470                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
13471                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
13472                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
13473                 </fields>
13474                 <links>
13475                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
13476                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
13477                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
13478                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
13479                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
13480                 </links>
13481         </class>
13482         <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">
13483                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
13484                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13485                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13486                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
13487                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
13488                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
13489                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
13490                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
13491                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
13492                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
13493                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
13494                 </fields>
13495                 <links>
13496                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13497                 </links>
13498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13499                         <actions>
13500                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13501                                 <retrieve/>
13502                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13503                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13504                         </actions>
13505                 </permacrud>
13506         </class>
13507
13508         <class id="coustl" controller="open-ils.cstore" 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">
13509                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
13510                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13511                         <field name="date_applied" reporter:datatype="timestamp"/>
13512                         <field name="org" reporter:datatype="org_unit"/>
13513                         <field name="original_value" reporter:datatype="text"/>
13514                         <field name="new_value" reporter:datatype="text"/>
13515                         <field name="field_name" reporter:datatype="link"/>
13516                 </fields>
13517                 <links>
13518                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
13519                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
13520                 </links>
13521         </class>
13522         <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">
13523                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13524                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13525                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13526                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13527                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13528                 </fields>
13529                 <links>
13530                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13531                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
13532                 </links>
13533         </class>
13534         <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">
13535                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13536                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13537                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13538                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13539                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13540                 </fields>
13541                 <links>
13542                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13543                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
13544                 </links>
13545         </class>
13546         <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">
13547                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
13548                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
13549                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13550                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
13551                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
13552                 </fields>
13553                 <links>
13554                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
13555                 </links>
13556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13557                         <actions>
13558                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13559                                 <retrieve/>
13560                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13561                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13562                         </actions>
13563                 </permacrud>
13564         </class>
13565         <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">
13566                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
13567                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13568                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
13569                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
13570                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
13571                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
13572                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
13573                 </fields>
13574                 <links>
13575                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
13576                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
13577                 </links>
13578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13579                         <actions>
13580                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13581                                 <retrieve/>
13582                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13583                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13584                         </actions>
13585                 </permacrud>
13586         </class>
13587         <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">
13588                 <fields oils_persist:primary="code">
13589                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
13590                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
13591                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13592                 </fields>
13593                 <links>
13594                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13595                 </links>
13596                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13597                         <actions>
13598                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13599                                 <retrieve/>
13600                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13601                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13602                         </actions>
13603                 </permacrud>
13604         </class>
13605         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Item Tags" oils_persist:field_safe="true">
13606                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
13607                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13608                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
13609                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
13610                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13611                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
13612                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
13613                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13614                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
13615                 </fields>
13616                 <links>
13617                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
13618                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13619                 </links>
13620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13621                         <actions>
13622                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
13623                                 <retrieve/>
13624                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
13625                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
13626                         </actions>
13627                 </permacrud>
13628         </class>
13629         <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">
13630                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
13631                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13632                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
13633                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
13634                 </fields>
13635                 <links>
13636                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13637                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
13638                 </links>
13639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13640                         <actions>
13641                                 <create permission="UPDATE_COPY">
13642                     <context link="copy" field="circ_lib"/>
13643                 </create>
13644                                 <retrieve/>
13645                                 <update permission="UPDATE_COPY">
13646                     <context link="copy" field="circ_lib"/>
13647                 </update>
13648                                 <delete permission="UPDATE_COPY">
13649                     <context link="copy" field="circ_lib"/>
13650                 </delete>
13651                         </actions>
13652                 </permacrud>
13653         </class>
13654         <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">
13655         <oils_persist:source_definition><![CDATA[
13656         SELECT ahcm.target_copy AS id,count(*) AS count
13657          FROM
13658          action.hold_request ahr,
13659          action.hold_copy_map ahcm
13660          WHERE
13661          ahr.cancel_time IS NULL AND
13662          ahr.fulfillment_time IS NULL AND
13663          ahr.capture_time IS NULL AND
13664          ahr.id = ahcm.hold
13665          GROUP BY ahcm.target_copy
13666         ]]></oils_persist:source_definition>
13667         <fields oils_persist:primary="id">
13668             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13669             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
13670         </fields>
13671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13672             <actions>
13673                <retrieve/>
13674             </actions>
13675         </permacrud>
13676         </class>
13677
13678         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
13679                 oils_obj:fieldmapper="config::workstation_setting_type" 
13680                 oils_persist:tablename="config.workstation_setting_type" 
13681                 reporter:label="Workstation Setting Type">
13682                 <fields oils_persist:primary="name">
13683                         <field name="name" reporter:datatype="text"/>
13684                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
13685                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
13686                         <field name="datatype" reporter:datatype="text"/>
13687                         <field name="fm_class" reporter:datatype="text"/>
13688                         <field name="grp" reporter:datatype="link"/>
13689                 </fields>
13690                 <links>
13691                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
13692                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
13693                 </links>
13694                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13695                         <actions>
13696                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13697                                 <retrieve/>
13698                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13699                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13700                         </actions>
13701                 </permacrud>
13702         </class>
13703
13704         <!-- no pcrud access is granted for now, because it's assumed these
13705                          setting values will be applied and retrived via the API. -->
13706         <class id="awss" 
13707                 controller="open-ils.cstore"
13708                 oils_obj:fieldmapper="actor::workstation_setting" 
13709                 oils_persist:tablename="actor.workstation_setting" 
13710                 reporter:label="Workstation Setting">
13711                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
13712                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
13713                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
13714                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13715                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
13716                 </fields>
13717                 <links>
13718                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
13719                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
13720                 </links>
13721         </class>
13722
13723         <class id="cht" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_type" oils_persist:tablename="config.hold_type" reporter:label="Hold Type" oils_persist:readonly="true">
13724         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
13725                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
13726                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
13727                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
13728         </fields>
13729         </class>
13730
13731         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
13732                 oils_obj:fieldmapper="config::print_template" 
13733                 oils_persist:tablename="config.print_template" 
13734                 reporter:label="Print Templates">
13735                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
13736                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
13737                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
13738                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
13739                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
13740                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13741                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
13742                         <field name="content_type" reporter:datatype="text"/>
13743                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13744                 </fields>
13745                 <links>
13746                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13747                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13748                 </links>
13749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13750                         <actions>
13751                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13752                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13753                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13754                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13755                         </actions>
13756                 </permacrud>
13757         </class>
13758
13759         <class id="cct" 
13760                 controller="open-ils.cstore open-ils.pcrud"
13761                 oils_obj:fieldmapper="config::carousel_type" 
13762                 oils_persist:tablename="config.carousel_type" 
13763                 reporter:label="Carousel Types">
13764                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13765                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13766                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13767                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13768                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13769                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13770                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13771                 </fields>
13772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13773                         <actions>
13774                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13775                                 <retrieve/>
13776                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13777                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13778                         </actions>
13779                 </permacrud>
13780         </class>
13781
13782         <class id="cc" 
13783                 controller="open-ils.cstore open-ils.pcrud"
13784                 oils_obj:fieldmapper="container::carousel" 
13785                 oils_persist:tablename="container.carousel" 
13786                 reporter:label="Carousels">
13787                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13788                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13789                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13790                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13791                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13792                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13793                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13794                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13795                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13796                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13797                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13798                         <field reporter:label="Item Libraries" name="owning_lib_filter" reporter:datatype="text" />      <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
13799                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13800                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13801                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13802                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13803                 </fields>
13804                 <links>
13805                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13806                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13807                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13808                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13809                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13810                 </links>
13811                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13812                         <actions>
13813                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13814                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13815                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13816                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13817                         </actions>
13818                 </permacrud>
13819         </class>
13820
13821         <class id="ccou" 
13822                 controller="open-ils.cstore open-ils.pcrud"
13823                 oils_obj:fieldmapper="container::carousel_org_unit" 
13824                 oils_persist:tablename="container.carousel_org_unit" 
13825                 reporter:label="Carousels Visible at Library">
13826                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13827                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13828                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13829                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13830                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13831                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13832                 </fields>
13833                 <links>
13834                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13835                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13836                 </links>
13837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13838                         <actions>
13839                                 <create permission="ADMIN_CAROUSEL">
13840                                     <context link="carousel" field="owner" />
13841                                 </create>
13842                                 <retrieve permission="ADMIN_CAROUSEL">
13843                                     <context link="carousel" field="owner" />
13844                                 </retrieve>
13845                                 <update permission="ADMIN_CAROUSEL">
13846                                     <context link="carousel" field="owner" />
13847                                 </update>
13848                                 <delete permission="ADMIN_CAROUSEL">
13849                                     <context link="carousel" field="owner" />
13850                                 </delete>
13851                         </actions>
13852                 </permacrud>
13853         </class>
13854
13855         <class id="cra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remoteauth_profile" oils_persist:tablename="config.remoteauth_profile" reporter:label="Remote Patron Authentication Configuration Profile">
13856                 <fields oils_persist:primary="name">
13857                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13858                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13859                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13860                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13861                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13862                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13863                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13864                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13865                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13866                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13867                 </fields>
13868                 <links>
13869                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13870                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13871                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13872                 </links>
13873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13874                         <actions>
13875                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13876                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13877                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13878                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13879                         </actions>
13880                 </permacrud>
13881         </class>
13882         <class id="cgs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::geolocation_service" oils_persist:tablename="config.geolocation_service" reporter:label="Geographic Location Service">
13883                 <fields oils_persist:primary="id" oils_persist:sequence="config.geolocation_service_id_seq">
13884                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
13885                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true"/>
13886                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13887                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
13888                         <field reporter:label="Service Code" name="service_code" reporter:datatype="text"/>
13889                         <field reporter:label="API Key" name="api_key" reporter:datatype="text"/>
13890                 </fields>
13891                 <links>
13892                         <link field="owner" reltype="has_a" key="id" class="aou"/>
13893                 </links>
13894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13895                         <actions>
13896                                 <create permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13897                                 <retrieve permission="VIEW_GEOLOCATION_SERVICES" global_required="true"/>
13898                                 <update permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13899                                 <delete permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13900                         </actions>
13901                 </permacrud>
13902         </class>
13903
13904         <!-- ********************************************************************************************************************* -->
13905 </IDL>
13906
13907 <!--
13908     vim:noet:ts=4:sw=4:
13909 -->