]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1846354 various speed improvements
[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                 </fields>
206                 <links>
207                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
208                 </links>
209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
210                         <actions>
211                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
212                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
213                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
214                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
215                         </actions>
216                 </permacrud>
217         </class>
218
219         <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">
220                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
221                         <field reporter:label="Field ID" name="id" reporter:datatype="id" reporter:selector="field"/>
222                         <field reporter:label="Group" name="grp" reporter:datatype="link" config_field="true"/>
223                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
224                 </fields>
225                 <links>
226                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
227                 </links>
228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
229                         <actions>
230                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
232                 </create>
233                                 <retrieve/>
234                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </update>
237                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
238                     <context link="grp" field="owner"/>
239                 </delete>
240                         </actions>
241                 </permacrud>
242         </class>
243
244         <class  id="rrbs" 
245             controller="open-ils.cstore open-ils.pcrud" 
246             oils_obj:fieldmapper="rating::record_badge_score" 
247             oils_persist:tablename="rating.record_badge_score" 
248             reporter:label="Statistical Popularity Badge">
249                 <fields oils_persist:primary="id" 
250                 oils_persist:sequence="rating.record_badge_score_id_seq">
251                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
252                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
253                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
254                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
255                 </fields>
256         <links>
257             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
258             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
259         </links>
260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
261                         <actions>
262                                 <retrieve/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267         <class  id="rp" 
268             controller="open-ils.cstore open-ils.pcrud" 
269             oils_obj:fieldmapper="rating::popularity_parameter" 
270             oils_persist:tablename="rating.popularity_parameter" 
271             reporter:label="Statistical Popularity Parameter">
272                 <fields oils_persist:primary="id" 
273                 oils_persist:sequence="rating.popularity_parameter_id_seq">
274                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
275                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
276                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
277                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
278                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
279                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
280                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
281                 </fields>
282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
283                         <actions>
284                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
285                                 <retrieve/>
286                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
287                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
288                         </actions>
289                 </permacrud>
290         </class>
291
292         <class  id="rb" 
293             controller="open-ils.cstore open-ils.pcrud" 
294             oils_obj:fieldmapper="rating::badge" 
295             oils_persist:tablename="rating.badge" 
296             reporter:label="Statistical Popularity Badge">
297                 <fields oils_persist:primary="id" 
298                 oils_persist:sequence="rating.badge_id_seq">
299                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
302                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
303                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
304                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
306                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
307                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
308                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
309                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
310                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
311                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
312                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
313                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
314                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
315                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
316                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
317                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
318                 </fields>
319                 <links>
320                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
321                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
322                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
323                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
324                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
325                 </links>
326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
327                         <actions>
328                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
329                                 <retrieve/>
330                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
331                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
332                         </actions>
333                 </permacrud>
334         </class>
335
336         <class  id="vibtg" 
337             controller="open-ils.cstore open-ils.pcrud" 
338             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
339             oils_persist:tablename="vandelay.import_bib_trash_group" 
340             reporter:label="Import/Overlay Field Groups for Removal">
341                 <fields oils_persist:primary="id" 
342                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
343                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
344                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
345                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
346                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
347                         <field reporter:label="Fields" name="import_bib_trash_fields" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                         <link field="import_bib_trash_fields" reltype="has_many" key="grp" map="" class="vibtf"/>
352                 </links>
353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
354                         <actions>
355                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                                 <retrieve/>
357                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
358                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
359                         </actions>
360                 </permacrud>
361         </class>
362
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
366                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
367                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
368                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
369                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
370                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
371                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
372                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
373                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
374                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
375                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
376                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
377                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
378                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
379                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
380                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
381                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
382                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
383                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
384                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
385                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
386                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
387                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
388                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
389                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
390                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
391                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
392                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
393                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
394                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
395                 </fields>
396                 <links>
397                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
398                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
399                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <create permission="CREATE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </create>
407                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </retrieve>
410                                 <update permission="UPDATE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </update>
413                                 <delete permission="DELETE_IMPORT_ITEM">
414                     <context link="definition" field="owner"/>
415                                 </delete>
416                         </actions>
417                 </permacrud>
418         </class>
419
420         <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">
421                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
422                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
423                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
424                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
425                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
426                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
427                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
428                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
429                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
430                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
431                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
432                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
433                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
434                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
435                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
436                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
437                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
438                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
439                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
440                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
441                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
442                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
443                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
444                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
445                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
446                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
447                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
448                 </fields>
449                 <links>
450                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
451                 </links>
452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
453                         <actions>
454                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                                 <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"/>
456                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
457                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
458                         </actions>
459                 </permacrud>
460         </class>
461
462         <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">
463                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
464                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
465                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
466                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
467                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
468                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
469                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
470                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
471                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
472                 </fields>
473                 <links>
474                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
475                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
476                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
477                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
478                 </links>
479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
480                         <actions>
481                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
484                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
485                         </actions>
486                 </permacrud>
487         </class>
488
489         <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">
490                 <fields oils_persist:primary="code">
491                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
492                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
493                 </fields>
494                 <links>
495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
496                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
497                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
498                 </links>
499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
500                         <actions>
501                                 <retrieve/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <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">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
508                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
509                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
510                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
511                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
512                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
513                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
514                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
515                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
516                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
517                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
518                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
520                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
521                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
522                 </fields>
523                 <links>
524                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
525                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
526                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
527                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
528             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
529             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
530             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
531                 </links>
532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
533                         <actions>
534                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
536                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
537                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
538                         </actions>
539                 </permacrud>
540         </class>
541
542         <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">
543                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
544                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
545                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
546                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
547                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
548                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
549                 </fields>
550                 <links/>
551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
552                         <actions>
553                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
554                 <retrieve/>
555                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
556                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
557                         </actions>
558                 </permacrud>
559         </class>
560
561         <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">
562                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
563                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
564                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
565                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
566                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
567                 </fields>
568                 <links>
569                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
570                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
571                 </links>
572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573                         <actions>
574                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
576                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
577                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
578                         </actions>
579                 </permacrud>
580         </class>
581
582         <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">
583                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
584                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
585                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
586                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
587                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
588                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
589                 </fields>
590                 <links>
591                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
592                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
593                 </links>
594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
595                         <actions>
596                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
598                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
599                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
600                         </actions>
601                 </permacrud>
602         </class>
603
604         <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">
605                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
606                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
607                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
609                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
610                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
611                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
612                 </fields>
613                 <links>
614                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
615                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
616                 </links>
617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
618                         <actions>
619                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
623                         </actions>
624                 </permacrud>
625         </class>
626
627         <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">
628                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
629                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
630                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
631                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
632                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
633                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
634                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
635                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
636                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
637                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
638                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
639                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
640                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
641                 </fields>
642                 <links>
643                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
644                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
645                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
646             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
647             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
648                 </links>
649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
650                         <actions>
651                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
654                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
655                         </actions>
656                 </permacrud>
657         </class>
658
659         <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">
660                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
661                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
662                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
663                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
664                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
665                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
666                 </fields>
667                 <links/>
668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
669                         <actions>
670                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                 <retrieve/>
672                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
673                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
674                         </actions>
675                 </permacrud>
676         </class>
677
678         <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">
679                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
680                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
681                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
682                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
683                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
684                 </fields>
685                 <links>
686                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
687                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
688                 </links>
689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
690                         <actions>
691                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
694                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
695                         </actions>
696                 </permacrud>
697         </class>
698
699         <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">
700                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
701                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
702                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
703                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
704                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
705                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
706                 </fields>
707                 <links>
708                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
709                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
710                 </links>
711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
712                         <actions>
713                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
716                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
717                         </actions>
718                 </permacrud>
719         </class>
720
721         <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">
722                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
723                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
724                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
725                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
726                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
727                 </fields>
728                 <links>
729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
730                 </links>
731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
732                         <actions>
733                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
735                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
736                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
737                         </actions>
738                 </permacrud>
739         </class>
740
741         <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">
742                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
743                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
744                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
745                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
746                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
747                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
748                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
749                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
750             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
751                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
752                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
753                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
754                 </fields>
755                 <links>
756                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
757                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
758                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
759                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
760                 </links>
761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
762                         <actions>
763                                 <create permission="ADMIN_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </create>
766                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </retrieve>
769                                 <update permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </update>
772                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
773                     <context link="match_set" field="owner"/>
774                                 </delete>
775                         </actions>
776                 </permacrud>
777         </class>
778
779         <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">
780                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
781                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
782                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
783                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
784                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
785                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
786                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
787                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
788                 </fields>
789                 <links>
790                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
791                 </links>
792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
793                         <actions>
794                                 <create permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </create>
797                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </retrieve>
800                                 <update permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </update>
803                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
804                     <context link="match_set" field="owner"/>
805                                 </delete>
806                         </actions>
807                 </permacrud>
808         </class>
809
810         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
811                 oils_obj:fieldmapper="vandelay::session_tracker" 
812                 oils_persist:tablename="vandelay.session_tracker" 
813                 reporter:label="Vandelay Session Tracker">
814                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
815                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
816                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
817                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
818                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
819                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
820                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
821                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
822                                          queue or an auth queue and there's no IDL class for vandelay.queue .
823                                          parent table.
824                         -->
825                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
826                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
827                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
828                         <field reporter:label="State" name="state" reporter:datatype="text"/>
829                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
830                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
831                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
832                 </fields>
833                 <links>
834                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
835                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
836                 </links>
837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
838                         <actions>
839                                 <!-- created by the API -->
840                                 <retrieve global_required="true"
841                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
842                                 <update global_required="true"
843                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
844                                         <context link="workstation" field="owning_lib"/>
845                                 </update>
846                                 <delete 
847                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
848                                         <context link="workstation" field="owning_lib"/>
849                                 </delete>
850                         </actions>
851                 </permacrud>
852         </class>
853
854         <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">
855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
856                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
857                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
858                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
859                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
860                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
861                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
862                 </fields>
863                 <links>
864                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
865                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
866                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
867                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
868                 </links>
869         </class>
870
871     <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">
872         <fields oils_persist:primary="name">
873             <field reporter:label="Name" name="name" reporter:datatype="text"/>
874             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
875             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
876             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
877         </fields>
878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
879             <actions>
880                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
883                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
884             </actions>
885         </permacrud>
886     </class>
887
888     <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">
889         <fields oils_persist:primary="id">
890             <field reporter:label="ID" name="id" reporter:datatype="id"/>
891             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
892             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
893             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
894             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
895         </fields>
896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
897             <actions>
898                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899                 <retrieve/>
900                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
901                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
902             </actions>
903         </permacrud>
904     </class>
905
906         <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">
907                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
908                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
909                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
910                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
911                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
912                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
913                 </fields>
914                 <links>
915                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
916                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
917                 </links>
918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
919             <actions>
920                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921                 <retrieve/>
922                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
923                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
924             </actions>
925         </permacrud>
926         </class>
927
928         <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">
929                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
930                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
931                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
933         </fields>
934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
935             <actions>
936                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
937                 <retrieve/>
938                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
939                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
940             </actions>
941         </permacrud>
942         </class>
943
944         <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">
945                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
946                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
947                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
948                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
949                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
950                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
952                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
953                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
954                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
955                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
956                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
957         </fields>
958                 <links>
959                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
960                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
961         </links>
962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
963             <actions>
964                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
965                 <retrieve/>
966                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
967                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
968             </actions>
969         </permacrud>
970         </class>
971
972         <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">
973                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
974                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
975                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
976                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
977                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
978                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
980                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
981                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
982                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
983                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
984         </fields>
985                 <links>
986                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
988         </links>
989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
990             <actions>
991                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
992                 <retrieve/>
993                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
994                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
995             </actions>
996         </permacrud>
997         </class>
998
999         <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">
1000                 <fields oils_persist:primary="name">
1001                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1002                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1003                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1004                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1005                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1006                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1007                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1008                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1009                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1010                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1011                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1012                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1013                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1014                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1015                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1016                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1017                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1018                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1019                 </fields>
1020                 <links>
1021                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1022                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1023                 </links>
1024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1025             <actions>
1026                 <create permission="ADMIN_SVF" global_required="true"/>
1027                 <retrieve/>
1028                 <update permission="ADMIN_SVF" global_required="true"/>
1029                 <delete permission="ADMIN_SVF" global_required="true"/>
1030             </actions>
1031         </permacrud>
1032         </class>
1033
1034         <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">
1035                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1036                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1037                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1038                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1039             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1040                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1041                 </fields>
1042                 <links/>
1043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1044             <actions>
1045                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046                 <retrieve/>
1047                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1048                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1049             </actions>
1050         </permacrud>
1051         </class>
1052
1053         <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">
1054                 <fields oils_persist:primary="coded_value">
1055                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1056                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1057                 </fields>
1058                 <links>
1059                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1060                 </links>
1061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1062             <actions>
1063                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1064                 <retrieve/>
1065                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1066                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1067             </actions>
1068         </permacrud>
1069         </class>
1070
1071         <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">
1072                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1073                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1074                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1075                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1076                 </fields>
1077                 <links>
1078                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1079                 </links>
1080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1081             <actions>
1082                 <retrieve/>
1083             </actions>
1084         </permacrud>
1085         </class>
1086
1087
1088         <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">
1089                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1090                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1091                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1092                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1093                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1094                 </fields>
1095                 <links>
1096                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1097                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106
1107         <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">
1108                 <fields oils_persist:primary="source">
1109                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1110                         <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 -->
1111                 </fields>
1112                 <links>
1113                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1114                 </links>
1115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1116             <actions>
1117                 <retrieve/>
1118             </actions>
1119         </permacrud>
1120         </class>
1121
1122         <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">
1123                 <fields>
1124                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1125                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1126                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1127                 </fields>
1128                 <links>
1129                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1130                 </links>
1131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1132             <actions>
1133                 <retrieve/>
1134             </actions>
1135         </permacrud>
1136         </class>
1137
1138         <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">
1139                 <fields oils_persist:primary="id">
1140                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1141                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1142                 </fields>
1143                 <links>
1144                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1145                 </links>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <retrieve/>
1149             </actions>
1150         </permacrud>
1151         </class>
1152
1153         <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">
1154                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1156                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1157                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1158                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1159                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1160                 </fields>
1161                 <links>
1162                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1163                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1164                 </links>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168                 <retrieve/>
1169                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1170                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1171             </actions>
1172         </permacrud>
1173         </class>
1174
1175         <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">
1176                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1177                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1178                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1179                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1180                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1181                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1182                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1183                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1185             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1186             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1187                 </fields>
1188                 <links>
1189                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1190                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1191                 </links>
1192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1193             <actions>
1194                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1195                 <retrieve/>
1196                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1197                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1198             </actions>
1199         </permacrud>
1200         </class>
1201
1202         <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">
1203                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1204                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1205                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1206                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1207                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1208                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1209                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1210                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1211                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1212                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1213                 </fields>
1214                 <links>
1215                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1216                 </links>
1217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218             <actions>
1219                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1222                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1223             </actions>
1224         </permacrud>
1225         </class>
1226
1227     <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">
1228         <fields oils_persist:primary="name">
1229             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1230             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1231             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1232             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1233             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1234             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1235             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1236             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1237             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link" config_field="true"/>
1238             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1239         </fields>
1240         <links>
1241             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1242             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1243         </links>
1244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1245             <actions>
1246                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247                 <retrieve/>
1248                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1249                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250             </actions>
1251         </permacrud>
1252     </class>
1253
1254     <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">
1255         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1256             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1257             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link" config_field="true"/>
1258             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1259             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1260             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1261             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1262             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1263         </fields>
1264         <links>
1265             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1266         </links>
1267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1268             <actions>
1269                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270                 <retrieve/>
1271                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1272                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1273             </actions>
1274         </permacrud>
1275     </class>
1276
1277     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1278                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1279                         oils_persist:tablename="config.z3950_index_field_map" 
1280                         reporter:label="Z39.50 Index Field Map">
1281         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1282             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1283             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1284             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1285             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1286             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1287             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1288         </fields>
1289         <links>
1290             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1291             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1292             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1293         </links>
1294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1295             <actions>
1296                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297                 <retrieve/>
1298                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1299                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1300             </actions>
1301         </permacrud>
1302     </class>
1303
1304
1305         <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">
1306                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1307                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1308                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1309                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1310                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1311                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1312                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1313                 </fields>
1314                 <links>
1315             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1316             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1317                 </links>
1318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1319                         <actions>
1320                                 <retrieve/>
1321                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1322                         </actions>
1323                 </permacrud>
1324         </class>
1325
1326         <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">
1327                 <fields oils_persist:primary="key">
1328                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1329                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1330                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1331                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1332                 </fields>
1333                 <links/>
1334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1335                         <actions>
1336                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1337                                 <retrieve/>
1338                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1339                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1340                         </actions>
1341                 </permacrud>
1342         </class>
1343
1344         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1345                 <fields oils_persist:primary="module">
1346                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1347                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1348                 </fields>
1349                 <links/>
1350         </class>
1351
1352         <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">
1353                 <fields oils_persist:primary="module">
1354                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1355                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1356                 </fields>
1357                 <links/>
1358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359                         <actions>
1360                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1361                                 <retrieve/>
1362                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1363                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1364                         </actions>
1365                 </permacrud>
1366         </class>
1367
1368         <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">
1369                 <fields oils_persist:primary="module">
1370                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1371                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1372                 </fields>
1373                 <links/>
1374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1375                         <actions>
1376                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1377                                 <retrieve/>
1378                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1379                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1380                         </actions>
1381                 </permacrud>
1382         </class>
1383
1384         <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">
1385                 <fields oils_persist:primary="module">
1386                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1387                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1388                 </fields>
1389                 <links/>
1390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1391                         <actions>
1392                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1393                                 <retrieve/>
1394                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1395                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1396                         </actions>
1397                 </permacrud>
1398         </class>
1399
1400         <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">
1401                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1402                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1403                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1404                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1405                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1406                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1407                 </fields>
1408                 <links>
1409                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1410                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1411                 </links>
1412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1413                         <actions>
1414                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </create>
1417                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </retrieve>
1420                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </update>
1423                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1424                     <context link="event_def" field="owner"/>
1425                 </delete>
1426                         </actions>
1427                 </permacrud>
1428         </class>
1429
1430         <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">
1431                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1432                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1433                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1434                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1435                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1436                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1437                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1438                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1439                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1440                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1441                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1442                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1443                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1444                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1445                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1446                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1447                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1448                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1449                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1450                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1451                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1452                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1453                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1454                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1455                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1456                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1457                 </fields>
1458                 <links>
1459                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1460                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1461                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1462                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1463                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1464                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1465                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1466                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1467                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1468                 </links>
1469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1470                         <actions>
1471                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1473                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1474                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1475                         </actions>
1476                 </permacrud>
1477         </class>
1478
1479         <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">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_id_seq">
1481                         <field reporter:label="Group ID" name="id" reporter:datatype="id"/>
1482                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1483                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1484                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1485                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1486                         <field reporter:label="Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
1487                 </fields>
1488                 <links>
1489                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1490                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1491                         <link field="members" reltype="has_many" key="grp" map="" class="atevdefgm"/>
1492                 </links>
1493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1494                         <actions>
1495                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1496                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1497                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1498                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1499                         </actions>
1500                 </permacrud>
1501         </class>
1502
1503         <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">
1504                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_def_group_member_id_seq">
1505                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1506                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1507                         <field reporter:label="Group" name="grp"  reporter:datatype="link"/>
1508                         <field reporter:label="Event Definition" name="event_def"  reporter:datatype="link"/>
1509                         <field reporter:label="Sortable" name="sortable" reporter:datatype="bool"/>
1510                         <field reporter:label="Include Holdings" name="holdings" reporter:datatype="bool"/>
1511                         <field reporter:label="Externally Processed" name="external" reporter:datatype="bool"/>
1512                 </fields>
1513                 <links>
1514                         <link field="grp" reltype="has_a" key="id" map="" class="atevdefg"/>
1515                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1516                 </links>
1517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1518                         <actions>
1519                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1520                     <context link="grp" field="owner"/>
1521                 </create>
1522                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1523                     <context link="grp" field="owner"/>
1524                 </retrieve>
1525                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1526                     <context link="grp" field="owner"/>
1527                 </update>
1528                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1529                     <context link="grp" field="owner"/>
1530                 </delete>
1531                         </actions>
1532                 </permacrud>
1533         </class>
1534
1535         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1536                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1537                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1538                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1539                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1540                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1541                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1542                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1543                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1544                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1545                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1546                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1547                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1548                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1549                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1550                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1551                 </fields>
1552                 <links>
1553                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1554                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1555                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1556                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1557                 </links>
1558         </class>
1559
1560         <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">
1561                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1562                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1563                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1564                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1565                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1566                 </fields>
1567                 <links>
1568                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1569                 </links>
1570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1571                         <actions>
1572                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1573                     <context link="event_def" field="owner"/>
1574                 </create>
1575                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1576                     <context link="event_def" field="owner"/>
1577                 </retrieve>
1578                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1579                     <context link="event_def" field="owner"/>
1580                 </update>
1581                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1582                     <context link="event_def" field="owner"/>
1583                 </delete>
1584                         </actions>
1585                 </permacrud>
1586         </class>
1587
1588         <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">
1589                 <oils_persist:source_definition><![CDATA[
1590                 SELECT  atevdef.hook,
1591                         atevdef.name,
1592                         atevdef.reactor,
1593                         atev.id,
1594                         atev.event_def,
1595                         atev.add_time,
1596                         atev.run_time,
1597                         atev.start_time,
1598                         atev.update_time,
1599                         atev.complete_time,
1600                         atev.update_process,
1601                         atev.state,
1602                         atev.user_data,
1603                         atev.template_output,
1604                         atev.error_output,
1605                         atev.async_output,
1606                         targ_circ.id AS target_circ,
1607                         targ_ahr.id AS target_hold,
1608                         COALESCE(
1609                                 targ_circ.circ_lib,
1610                                 targ_ahr.pickup_lib
1611                         ) AS perm_lib
1612                 FROM action_trigger.event atev
1613                 JOIN action_trigger.event_definition atevdef ON
1614                         (atevdef.id = atev.event_def)
1615                 JOIN action_trigger.hook ath ON
1616                         (ath.key = atevdef.hook)
1617                 LEFT JOIN action.circulation targ_circ ON
1618                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1619                 LEFT JOIN action.hold_request targ_ahr ON
1620                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1621                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1622                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1623                                 'circ.staff.max_visible_event_age',
1624                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1625                         ) UNION
1626                         SELECT '1000 YEARS'::INTERVAL AS value
1627                 ) ous)
1628                 ]]></oils_persist:source_definition>
1629                 <fields oils_persist:primary="id">
1630                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1631                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1632                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1633                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1634                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1635                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1636                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1637                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1638                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1639                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1640                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1641                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1642                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1643                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1644                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1645                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1646                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1647                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1648                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1649                 </fields>
1650                 <links>
1651                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1652                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1653                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1654                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1655                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1656                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1657                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1658                 </links>
1659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660                         <actions>
1661                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1662                         </actions>
1663                 </permacrud>
1664         </class>
1665
1666         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1667                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1668                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1669                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1670                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1671                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1672                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1673                 </fields>
1674                 <links>
1675                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1676                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1677                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1678                 </links>
1679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1680                         <actions>
1681                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1682                         </actions>
1683                 </permacrud>
1684         </class>
1685
1686         <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">
1687                 <fields oils_persist:primary="code">
1688                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1689                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1690                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1691                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1692                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1693                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1694                 </fields>
1695                 <links/>
1696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1697             <actions>
1698                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1699                 <retrieve/>
1700                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1701                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1702             </actions>
1703         </permacrud>
1704         </class>
1705
1706         <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">
1707                 <fields oils_persist:primary="code">
1708                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1709                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1710                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1711                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1712                 </fields>
1713                 <links/>
1714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1715             <actions>
1716                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1717                 <retrieve/>
1718                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1719                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1720             </actions>
1721         </permacrud>
1722         </class>
1723
1724         <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">
1725                 <fields oils_persist:primary="code">
1726                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1727                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1728                 </fields>
1729                 <links/>
1730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1731             <actions>
1732                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1733                 <retrieve/>
1734                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1735                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1736             </actions>
1737         </permacrud>
1738         </class>
1739
1740         <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">
1741                 <fields oils_persist:primary="code">
1742                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1743                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1744                 </fields>
1745                 <links/>
1746         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1747             <actions>
1748                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1749                 <retrieve/>
1750                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1751                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1752             </actions>
1753         </permacrud>
1754         </class>
1755
1756         <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">
1757                 <fields oils_persist:primary="code">
1758                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1759                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1760                 </fields>
1761                 <links/>
1762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1763             <actions>
1764                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1765                 <retrieve/>
1766                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1767                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1768             </actions>
1769         </permacrud>
1770         </class>
1771
1772         <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">
1773                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1774                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1775                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1776                 </fields>
1777                 <links/>
1778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1779             <actions>
1780                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1781                 <retrieve/>
1782                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1783                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1784             </actions>
1785         </permacrud>
1786         </class>
1787
1788         <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">
1789                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1790                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1791                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1792                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1793                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1794                 </fields>
1795         <links>
1796             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1797             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1798             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1799         </links>
1800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1801             <actions>
1802                 <create permission="UPDATE_COPY">
1803                     <context link="target_copy" field="circ_lib"/>
1804                 </create>
1805                 <retrieve/>
1806                 <update permission="UPDATE_COPY">
1807                     <context link="target_copy" field="circ_lib"/>
1808                 </update>
1809                 <delete permission="UPDATE_COPY">
1810                     <context link="target_copy" field="circ_lib"/>
1811                 </delete>
1812             </actions>
1813         </permacrud>
1814         </class>
1815
1816         <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">
1817                 <fields oils_persist:primary="code">
1818                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1819                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1820                 </fields>
1821                 <links/>
1822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1823             <actions>
1824                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1825                 <retrieve/>
1826                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1827                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1828             </actions>
1829         </permacrud>
1830         </class>
1831
1832         <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">
1833                 <fields oils_persist:primary="code">
1834                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1835                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1836                 </fields>
1837                 <links/>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1841                 <retrieve/>
1842                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1843                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1844             </actions>
1845         </permacrud>
1846         </class>
1847
1848         <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">
1849                 <fields oils_persist:primary="code">
1850                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1851                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1852                 </fields>
1853                 <links/>
1854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1855             <actions>
1856                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1857                 <retrieve/>
1858                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1859                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1860             </actions>
1861         </permacrud>
1862         </class>
1863
1864     <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">
1865         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1866             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1867             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1868             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1869             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1870             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1871             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1872             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1873             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1874             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1875             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1876             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1877             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1878             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1879             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1880             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1881             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1882             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1883         </fields>
1884         <links/>
1885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1886             <actions>
1887                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1888                 <retrieve/>
1889                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1890                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1891             </actions>
1892         </permacrud>
1893     </class>
1894
1895     <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">
1896         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1897             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1898             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1899             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1900             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1901             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1902             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1903             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1904             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1905             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1906             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1907             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1908             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1909             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1910             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1911             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1912             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1913             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1914             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1915             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1916         </fields>
1917         <links/>
1918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1919             <actions>
1920                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1921                 <retrieve/>
1922                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1923                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1924             </actions>
1925         </permacrud>
1926     </class>
1927
1928     <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">
1929         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1930             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1931             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1932             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1933             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1934             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1935         </fields>
1936         <links>
1937             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1938             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1939             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1940         </links>
1941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1942             <actions>
1943                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1944                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1945                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1946                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1947             </actions>
1948         </permacrud>
1949     </class>
1950
1951         <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">
1952                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1953                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1954                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1955                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1956                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1957                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1958                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1959                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1960                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1961                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1962                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1963                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1964                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1965                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1966                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1967                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1968                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1969             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1970                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1971                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1972                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1973                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1974                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1975                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1976                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1977                 </fields>
1978                 <links>
1979                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1980                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1981                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1984                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1985                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1986                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1987                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1988                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1989                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1990                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1991                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1992             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1993                 </links>
1994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1995             <actions>
1996                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1997                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1998                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1999                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
2000             </actions>
2001         </permacrud>
2002         </class>
2003
2004         <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">
2005                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
2006                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
2007                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
2008                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
2009                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
2010                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
2011                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
2012                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
2013                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
2014                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
2015                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
2016                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
2017                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
2018                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
2019                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
2020                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
2021             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
2022                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
2023                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
2024             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
2025                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
2026                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
2027                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2028                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2029             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2030             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
2031             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
2032                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
2033                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
2034                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
2035                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
2036                 </fields>
2037                 <links>
2038                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2039                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2040                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2041                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
2042                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2043                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
2044                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2045                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
2046                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
2047                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2048                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
2049                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
2050                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
2051                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
2052             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2053                 </links>
2054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2055             <actions>
2056                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2057                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2058                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2059                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2060             </actions>
2061         </permacrud>
2062         </class>
2063
2064     <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">
2065         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2066             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2067             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2068             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2069         </fields>
2070         <links/>
2071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2072             <actions>
2073                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2074                 <retrieve/>
2075                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2076                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2077             </actions>
2078         </permacrud>
2079     </class>
2080
2081     <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">
2082         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2083             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2084             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2085             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2086             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2087             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2088             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2089             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2090         </fields>
2091         <links>
2092             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2093         </links>
2094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2095             <actions>
2096                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2097                 <retrieve/>
2098                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2099                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2100             </actions>
2101         </permacrud>
2102     </class>
2103
2104     <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">
2105         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2106             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2107             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2108             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2109             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2110             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2111         </fields>
2112         <links>
2113             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2114             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2115         </links>
2116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2117             <actions>
2118                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2119                     <context link="matchpoint" field="org_unit"/>
2120                 </create>
2121                 <retrieve/>
2122                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2123                     <context link="matchpoint" field="org_unit"/>
2124                 </update>
2125                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2126                     <context link="matchpoint" field="org_unit"/>
2127                 </delete>
2128             </actions>
2129         </permacrud>
2130     </class>
2131
2132     <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">
2133         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2134             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2135             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2136             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2137         </fields>
2138         <links>
2139             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2140             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2141         </links>
2142         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2143             <actions>
2144                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </create>
2147                 <retrieve/>
2148                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2149                     <context link="limit_set" field="owning_lib"/>
2150                 </update>
2151                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2152                     <context link="limit_set" field="owning_lib"/>
2153                 </delete>
2154             </actions>
2155         </permacrud>
2156     </class>
2157     <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">
2158         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2159             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2160             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2161             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2162         </fields>
2163         <links>
2164             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2165             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2166         </links>
2167         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2168             <actions>
2169                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2170                     <context link="limit_set" field="owning_lib"/>
2171                 </create>
2172                 <retrieve/>
2173                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2174                     <context link="limit_set" field="owning_lib"/>
2175                 </update>
2176                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2177                     <context link="limit_set" field="owning_lib"/>
2178                 </delete>
2179             </actions>
2180         </permacrud>
2181     </class>
2182
2183     <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">
2184         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2185             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2186             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2187             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2188             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2189         </fields>
2190         <links>
2191             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2192             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2193         </links>
2194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2195             <actions>
2196                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2197                     <context link="limit_set" field="owning_lib"/>
2198                 </create>
2199                 <retrieve/>
2200                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2201                     <context link="limit_set" field="owning_lib"/>
2202                 </update>
2203                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2204                     <context link="limit_set" field="owning_lib"/>
2205                 </delete>
2206             </actions>
2207         </permacrud>
2208     </class>
2209
2210         <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">
2211                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2212                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2213                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2214                 </fields>
2215                 <links/>
2216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2217             <actions>
2218                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2219                 <retrieve/>
2220                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2221                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2222             </actions>
2223         </permacrud>
2224         </class>
2225
2226         <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">
2227                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2228                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2229                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2230                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2232                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2233                 </fields>
2234                 <links>
2235                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2236                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2237                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2238                 </links>
2239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2240             <actions>
2241                 <create permission="ADMIN_SURVEY">
2242                     <context link="survey" field="owner"/>
2243                 </create>
2244                 <retrieve/>
2245                 <update permission="ADMIN_SURVEY">
2246                     <context link="survey" field="owner"/>
2247                 </update>
2248                 <delete permission="ADMIN_SURVEY">
2249                     <context link="survey" field="owner"/>
2250                 </delete>
2251             </actions>
2252         </permacrud>
2253         </class>
2254         <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">
2255                 <fields oils_persist:primary="id" oils_persist:sequence="">
2256                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2257                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2258                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2259                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2260                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2261                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2262                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2263                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2264                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2265                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2266                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2267                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2268                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2269                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2270                 </fields>
2271                 <links>
2272                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2273                 </links>
2274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2275                         <actions>
2276                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2277                                         <context link="usr" field="home_ou" />
2278                                 </retrieve>
2279                         </actions>
2280                 </permacrud>
2281         </class>
2282         <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">
2283                 <fields oils_persist:primary="id" oils_persist:sequence="">
2284                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2285                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2286                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2287                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2288                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2289                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2290                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2291                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2292                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2293                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2294                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2295                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2296                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2297                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2298                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2299                 </fields>
2300                 <links>
2301                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2302                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2303                 </links>
2304         </class>
2305         <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">
2306                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2307                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2308                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2309                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2310                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2311                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2312                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2313                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2314                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2315                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2316                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2317                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
2318                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2319                 </fields>
2320                 <links>
2321                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2322                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2323                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2324                 </links>
2325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2326                         <actions> <!-- created magically, so no create action -->
2327                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2328                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2329                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2330                         </actions>
2331                 </permacrud>
2332         </class>
2333         <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)">
2334                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2335                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2336                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2337                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2338                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2339                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2340                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2341                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2342                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2343                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2344                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2345                         <field reporter:label="Editor" name="usr" reporter:datatype="link" />
2346                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2347                 </fields>
2348                 <links>
2349                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2350                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2351                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2352                 </links>
2353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2354                         <actions> <!-- created magically, so no create action -->
2355                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2356                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2357                         </actions>
2358                 </permacrud>
2359         </class>
2360         <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">
2361         <fields oils_persist:primary="id">
2362                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2363                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Debug: Set Date (Penalty)" name="ausp_set_date" reporter:datatype="timestamp"/>
2365                         <field reporter:label="Debug: Creation Date/Time (Message)" name="aum_create_date" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2367                         <field reporter:label="Creating Library" name="org_unit" reporter:datatype="link"/>
2368                         <field reporter:label="Debug: Creating Library (Penalty)" name="ausp_org_unit" reporter:datatype="link"/>
2369                         <field reporter:label="Debug: Creating Library (Message)" name="aum_sending_lib" reporter:datatype="link"/>
2370                         <field reporter:label="Debug: Penalty ID" name="ausp_id" reporter:datatype="id" />
2371                         <field reporter:label="Debug: Message ID" name="aum_id" reporter:datatype="id" />
2372                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2373                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2374                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2375                         <field reporter:label="Debug: User (Penalty)" name="ausp_usr" reporter:datatype="link" />
2376                         <field reporter:label="Debug: User (Message)" name="aum_usr" reporter:datatype="link" />
2377                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2378                         <field reporter:label="Patron Visible?" name="pub" reporter:datatype="bool"/>
2379                         <field reporter:label="Stop Date/Time" name="stop_date" reporter:datatype="timestamp"/>
2380                         <field reporter:label="Debug: Stop Date/Time (Penalty)" name="ausp_stop_date" reporter:datatype="timestamp"/>
2381                         <field reporter:label="Debug: Stop Date/Time (Message)" name="aum_stop_date" reporter:datatype="timestamp"/>
2382                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
2383                         <field reporter:label="Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2384                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2385                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2386                         <field name="ausp_usr_message" reporter:datatype="link" reporter:label="Debug: User Message (Penalty)"/>
2387                 </fields>
2388                 <links>
2389                         <link field="ausp_id" reltype="has_a" key="id" map="" class="ausp"/>
2390                         <link field="aum_id" reltype="has_a" key="id" map="" class="aum"/>
2391                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2392                         <link field="ausp_usr" reltype="has_a" key="id" map="" class="au"/>
2393                         <link field="aum_usr" reltype="has_a" key="id" map="" class="au"/>
2394                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2395                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2396                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2397                         <link field="aum_sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2398                         <link field="ausp_org_unit" reltype="has_a" key="id" map="" class="aou"/>
2399                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2400                         <link field="ausp_usr_message" reltype="has_a" key="id" map="" class="aum"/>
2401                 </links>
2402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2403                         <actions> <!-- created magically, so no create action -->
2404                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2405                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2406                         </actions>
2407                 </permacrud>
2408         </class>
2409
2410         <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">
2411                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2412                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2413                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2414                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2415                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2416                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2417                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2418                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2419                 </fields>
2420                 <links>
2421                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2422                 </links>
2423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2424                         <actions>
2425                                 <create permission="UPDATE_USER">
2426                                         <context link="usr" field="home_ou"/>
2427                                 </create>
2428                                 <retrieve permission="VIEW_USER">
2429                                         <context link="usr" field="home_ou"/>
2430                                 </retrieve>
2431                                 <update permission="UPDATE_USER">
2432                                         <context link="usr" field="home_ou"/>
2433                                 </update>
2434                                 <delete permission="UPDATE_USER">
2435                                         <context link="usr" field="home_ou"/>
2436                                 </delete>
2437                         </actions>
2438                 </permacrud>
2439         </class>
2440         <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">
2441                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2442                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2443                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2444                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2445                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2446                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2447                 </fields>
2448                 <links>
2449                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2450                 </links>
2451         </class>
2452         <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">
2453                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2454                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2455                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2456                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2457                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2458                 </fields>
2459                 <links>
2460                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2461                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2462                 </links>
2463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2464                         <actions>
2465                                 <retrieve permission="VIEW_USER">
2466                                         <context link="usr" field="home_ou" />
2467                                 </retrieve>
2468                         </actions>
2469                 </permacrud>
2470         </class>
2471         <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">
2472                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2473                         <field name="field" reporter:datatype="link"/>
2474                         <field name="id" reporter:datatype="id" />
2475                         <field name="source" reporter:datatype="link"/>
2476                         <field name="value" reporter:datatype="text"/>
2477                 </fields>
2478                 <links>
2479                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2480                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2481                 </links>
2482         </class>
2483         <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">
2484                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2485                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2486                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2487                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2488                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2489                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2490                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2491                 </fields>
2492                 <links>
2493                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2494                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2495                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2496                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2497                 </links>
2498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2499                         <actions>
2500                                 <retrieve/>
2501                         </actions>
2502                 </permacrud>
2503         </class>
2504         <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">
2505                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2506                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2507                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2508                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2509                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2510                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2511                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2512                 </fields>
2513                 <links>
2514                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2515                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2516                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2517                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2518                 </links>
2519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2520                         <actions>
2521                                 <retrieve/>
2522                         </actions>
2523                 </permacrud>
2524         </class>
2525         <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">
2526                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2527                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2528                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2529                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2530                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2531                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2532                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2533                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2534                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2535                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2536                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2537                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2538                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2539                 </fields>
2540                 <links>
2541                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2542                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2543                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2544                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2545                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2546                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2547                 </links>
2548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2549             <actions>
2550                 <create permission="TRANSIT_COPY" context_field="owner">
2551                     <context link="target_copy" field="circ_lib"/>
2552                 </create>
2553                 <retrieve/>
2554                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2555                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2556             </actions>
2557         </permacrud>
2558         </class>
2559         <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">
2560                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2561                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2562                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2563                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2564                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2565                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2566                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2567                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2568                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2569                 </fields>
2570                 <links>
2571                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2572                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2573                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2574                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2575                 </links>
2576         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2577             <actions>
2578                 <create permission="ADMIN_SURVEY">
2579                     <context link="survey" field="owner"/>
2580                 </create>
2581                 <retrieve permission="VIEW_USER">
2582                     <context link="usr" field="home_ou"/>
2583                 </retrieve>
2584                 <update permission="ADMIN_SURVEY">
2585                     <context link="survey" field="owner"/>
2586                 </update>
2587                 <delete permission="ADMIN_SURVEY">
2588                     <context link="survey" field="owner"/>
2589                 </delete>
2590             </actions>
2591         </permacrud>
2592         </class>
2593         <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">
2594                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2595                         <field name="bucket" />
2596                         <field name="id" reporter:datatype="id" />
2597                         <field name="target_copy" reporter:datatype="link"/>
2598                         <field name="create_time" reporter:datatype="timestamp" />
2599                         <field name="pos" reporter:datatype="int" />
2600                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2601                 </fields>
2602                 <links>
2603                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2604                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2605             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2606                 </links>
2607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2608                         <actions>
2609                                 <retrieve permission="ADMIN_COPY_BUCKET">
2610                     <context link="bucket" owning_lib="owning_lib"/>
2611                 </retrieve>
2612             </actions>
2613         </permacrud>
2614         </class>
2615         <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">
2616                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2617                         <field name="id" reporter:datatype="id" />
2618                         <field name="item" reporter:datatype="link"/>
2619                         <field name="note" reporter:datatype="text" />
2620                 </fields>
2621                 <links>
2622                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2623                 </links>
2624         </class>
2625
2626         <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">
2627                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2628                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2630                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2631                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2632                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2633                 </fields>
2634                 <links>
2635                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2636                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2637                 </links>
2638                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2639                         <actions>
2640                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2641                                 <retrieve/>
2642                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2643                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2644                         </actions>
2645                 </permacrud>
2646         </class>
2647
2648         <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">
2649                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2650                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2651                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2652                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2653                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2654                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2655                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2656                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2657                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2658                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2659                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2660                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2661                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2662                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2663                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2664                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2665                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2666                 </fields>
2667                 <links>
2668                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2669                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2670                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2671                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2672                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2673                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2674                         <link field="heading_field" reltype="has_a" key="id" map="" class="ahf"/>
2675                 </links>
2676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2677                         <actions>
2678                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2679                                 <retrieve/>
2680                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2681                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2682                         </actions>
2683                 </permacrud>
2684         </class>
2685
2686         <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">
2687                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2688                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2689                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2690                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2691                 </fields>
2692                 <links>
2693                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2694                 </links>
2695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2696                         <actions>
2697                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2698                                 <retrieve/>
2699                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2700                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2701                         </actions>
2702                 </permacrud>
2703         </class>
2704
2705         <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">
2706                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2707                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2708                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2709                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2710                 </fields>
2711                 <links>
2712                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2713                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2714                 </links>
2715                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2716                         <actions>
2717                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2718                                 <retrieve/>
2719                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2720                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2721                         </actions>
2722                 </permacrud>
2723         </class>
2724
2725         <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">
2726                 <fields oils_persist:primary="code">
2727                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2728                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2729                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2730                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2731                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2732                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2733                 </fields>
2734                 <links>
2735                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2736                 </links>
2737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2738                         <actions>
2739                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2740                                 <retrieve/>
2741                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2742                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2743                         </actions>
2744                 </permacrud>
2745         </class>
2746
2747         <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">
2748                 <fields oils_persist:primary="code">
2749                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2750                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2751                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2752                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2753                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2754                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2755                 </fields>
2756                 <links>
2757                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2758                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2759                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2760                 </links>
2761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2762                         <actions>
2763                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2764                                 <retrieve/>
2765                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2766                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2767                         </actions>
2768                 </permacrud>
2769         </class>
2770
2771     <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">
2772         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2773             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2774             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2775             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2776         </fields>
2777         <links>
2778             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2779             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2780         </links>
2781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2784                 <retrieve/>
2785                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2786                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2787             </actions>
2788         </permacrud>
2789     </class>
2790
2791         <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">
2792                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2793                         <field name="active" reporter:datatype="bool"/>
2794                         <field name="create_date" reporter:datatype="timestamp"/>
2795                         <field name="creator" />
2796                         <field name="deleted" reporter:datatype="bool"/>
2797                         <field name="edit_date" reporter:datatype="timestamp"/>
2798                         <field name="editor" />
2799                         <field name="id" reporter:datatype="id" />
2800                         <field name="last_xact_id" />
2801                         <field name="marc" />
2802                         <field name="source" />
2803                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2804                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2805                         <field name="heading" />
2806                         <field name="simple_heading" />
2807                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2808                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2809                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2810                 </fields>
2811                 <links>
2812                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2813                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2814                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2815                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2816                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2817                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2818                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2819                 </links>
2820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2821                         <actions>
2822                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2823                                 <retrieve/>
2824                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2825                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2826                         </actions>
2827                 </permacrud>
2828         </class>
2829         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2830                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2831                         <field name="char_encoding" />
2832                         <field name="id" />
2833                         <field name="record" />
2834                         <field name="record_status" />
2835                         <field name="thesaurus" />
2836                 </fields>
2837                 <links>
2838                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2839                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2840                 </links>
2841         </class>
2842         <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">
2843                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2844                         <field name="id" reporter:datatype="id" />
2845                         <field name="bib" reporter:datatype="link" />
2846                         <field name="authority" reporter:datatype="link" />
2847                 </fields>
2848                 <links>
2849                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2850                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2851                 </links>
2852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2853                         <actions>
2854                                 <retrieve/>
2855                         </actions>
2856                 </permacrud>
2857         </class>
2858         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2859                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2860                         <field name="id" reporter:datatype="id" />
2861                         <field name="record" reporter:datatype="link" />
2862                         <field name="atag" reporter:datatype="link" />
2863                         <field name="value" reporter:datatype="text" />
2864                         <field name="thesaurus" reporter:datatype="text" />
2865                 </fields>
2866                 <links>
2867                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2868                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2869                 </links>
2870         </class>
2871
2872         <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">
2873                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2874                         <field name="id" reporter:datatype="id" reporter:selector="label" />
2875                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2876                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2877                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2878                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2879                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2880                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2881                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2882                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2883                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2884                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2885                 </fields>
2886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2887                         <actions>
2888                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2889                                 <retrieve/>
2890                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2891                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2892                         </actions>
2893                 </permacrud>
2894         </class>
2895
2896         <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">
2897                 <fields oils_persist:primary="code" oils_persist:sequence="">
2898                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2899                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2900                 </fields>
2901                 <links/>
2902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2903             <actions>
2904                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2905                 <retrieve/>
2906                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2907                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2908             </actions>
2909         </permacrud>
2910         </class>
2911         <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">
2912                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2913                         <field name="accepting_usr" />
2914                         <field name="amount" reporter:datatype="money" />
2915                         <field name="amount_collected" reporter:datatype="money" />
2916                         <field name="approval_code" reporter:datatype="text"/>
2917                         <field name="cash_drawer" reporter:datatype="link"/>
2918                         <field name="cc_number" reporter:datatype="text"/>
2919                         <field name="cc_order_number" reporter:datatype="text"/>
2920                         <field name="cc_processor" reporter:datatype="text"/>
2921                         <field name="id" reporter:datatype="id" />
2922                         <field name="note" reporter:datatype="text"/>
2923                         <field name="payment_ts" reporter:datatype="timestamp"/>
2924                         <field name="xact" reporter:datatype="link"/>
2925                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2926                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2927                 </fields>
2928                 <links>
2929                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2930                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2931                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2932                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2933                 </links>
2934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2935             <actions>
2936                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2937                     <context link="xact" jump="usr" field="home_ou"/>
2938                 </retrieve>
2939                         </actions>
2940                 </permacrud>
2941         </class>
2942         <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">
2943                 <fields oils_persist:primary="name">
2944                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2945                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2946                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2947                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2948                 </fields>
2949                 <links/>
2950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2951             <actions>
2952                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2953                 <retrieve/>
2954                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2955                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2956             </actions>
2957         </permacrud>
2958         </class>
2959
2960         <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">
2961                 <fields oils_persist:primary="alias">
2962                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2963                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2964                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2965                 </fields>
2966                 <links>
2967                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2968                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2969                 </links>
2970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2971             <actions>
2972                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2973                 <retrieve/>
2974                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2975                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2976             </actions>
2977         </permacrud>
2978         </class>
2979
2980         <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">
2981                 <fields oils_persist:primary="name">
2982                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2983                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2984                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2985                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2986                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2987                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2988                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2989                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2990                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2991                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2992                 </fields>
2993                 <links>
2994                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2995                 </links>
2996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2997             <actions>
2998                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2999                 <retrieve/>
3000                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
3001                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
3002             </actions>
3003         </permacrud>
3004         </class>
3005
3006         <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">
3007                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
3008                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
3009                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
3010                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3011                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3012                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
3013                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
3014                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
3015                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
3016                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
3017                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
3018                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
3019                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
3020                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
3021                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
3022                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
3023                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
3024                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
3025                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
3026                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
3027                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
3028                 </fields>
3029                 <links>
3030                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
3031                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
3032                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
3033                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
3034                 </links>
3035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3036             <actions>
3037                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3038                 <retrieve/>
3039                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3040                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3041             </actions>
3042         </permacrud>
3043         </class>
3044
3045         <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">
3046                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
3047                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3048                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
3049                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link" config_field="true"/>
3050                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
3051                 </fields>
3052                 <links>
3053                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
3054                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
3055                 </links>
3056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3057             <actions>
3058                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3059                 <retrieve/>
3060                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3061                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
3062             </actions>
3063         </permacrud>
3064         </class>
3065
3066         <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">
3067                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
3068                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
3069                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3070                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
3071                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
3072                         <field reporter:label="Owning Lib to Patron Home Lib Proximity" name="owning_lib_to_home_lib_prox" reporter:datatype="int" />
3073                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
3074                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
3075                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
3076                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
3077                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
3078                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
3079                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
3080                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
3081                 </fields>
3082                 <links>
3083                 </links>
3084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3085                         <actions>
3086                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3087                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3088                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3089                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
3090                         </actions>
3091                 </permacrud>
3092         </class>
3093         <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">
3094                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
3095                         <field name="id" reporter:datatype="id" />
3096                         <field name="name" reporter:datatype="text"/>
3097                         <field name="xpath" reporter:datatype="text"/>
3098                         <field name="format" reporter:datatype="link"/>
3099                         <field name="first_word" reporter:datatype="bool" />
3100                 </fields>
3101                 <links/>
3102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3103             <actions>
3104                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3105                 <retrieve/>
3106                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3107                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3108             </actions>
3109         </permacrud>
3110         </class>
3111         <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">
3112                 <fields oils_persist:primary="code" oils_persist:sequence="">
3113                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3114                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3115                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3116                 </fields>
3117                 <links/>
3118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3119             <actions>
3120                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3121                 <retrieve/>
3122                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3123                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3124             </actions>
3125         </permacrud>
3126         </class>
3127         <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">
3128                 <fields oils_persist:primary="code" oils_persist:sequence="">
3129                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3130                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3131                 </fields>
3132                 <links/>
3133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3134             <actions>
3135                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3136                 <retrieve/>
3137                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3138                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3139             </actions>
3140         </permacrud>
3141         </class>
3142     <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">
3143         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_id_seq">
3144             <field reporter:label="ID" name="id" reporter:datatype="id" />
3145             <field reporter:label="Course Name" name="name" reporter:datatype="text" oils_obj:required="true" />
3146             <field reporter:label="Course Number" name="course_number" reporter:datatype="text" oils_obj:required="true" />
3147             <field reporter:label="Section Number" name="section_number" reporter:datatype="text" />
3148             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3149             <field reporter:label="Course Members" name="members" oils_persist:virtual="true" reporter:datatype="link" />
3150             <field reporter:label="Course Materials" name="materials" oils_persist:virtual="true" reporter:datatype="link" />
3151             <field reporter:label="Is Archived?" name="is_archived" reporter:datatype="bool" />
3152                         <field reporter:label="Terms Taught" name="terms_map" oils_persist:virtual="true" reporter:datatype="link" config_field="true" />
3153         </fields>
3154         <links>
3155             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3156             <link field="members" reltype="has_many" key="course" map="" class="acmcu" />
3157             <link field="materials" reltype="has_many" key="course" map="" class="acmcm" />
3158                         <link field="terms_map" reltype="has_many" key="course" map="" class="acmtcm" />
3159         </links>
3160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3161             <actions>
3162                 <create permission="MANAGE_RESERVES" context_field="owning_lib"/>
3163                 <retrieve/>
3164                 <update permission="MANAGE_RESERVES" context_field="owning_lib"/>
3165                 <delete permission="MANAGE_RESERVES" context_field="owning_lib"/>
3166             </actions>
3167         </permacrud>
3168     </class>
3169     <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">
3170         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_users_id_seq">
3171             <field reporter:label="ID" name="id" reporter:datatype="id" />
3172             <field reporter:label="Course" name="course" reporter:datatype="link" />
3173             <field reporter:label="User" name="usr" reporter:datatype="link" />
3174             <field reporter:label="User Role" name="usr_role" reporter:datatype="link" />
3175         </fields>
3176         <links>
3177             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3178             <link field="usr" reltype="has_a" key="id" map="" class="au" />
3179             <link field="usr_role" reltype="has_a" key="id" map="" class="acmr" />
3180         </links>
3181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3182             <actions>
3183                 <create permission="MANAGE_RESERVES">
3184                                         <context link="course" field="owning_lib" />
3185                 </create>
3186                 <retrieve/>
3187                 <update permission="MANAGE_RESERVES">
3188                                         <context link="course" field="owning_lib" />
3189                 </update>
3190                 <delete permission="MANAGE_RESERVES">
3191                                         <context link="course" field="owning_lib" />
3192                 </delete>
3193             </actions>
3194         </permacrud>
3195     </class>
3196     <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">
3197         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_course_materials_id_seq">
3198             <field reporter:label="ID" name="id" reporter:datatype="id" />
3199             <field reporter:label="Course" name="course" reporter:datatype="link" />
3200             <field reporter:label="Item" name="item" reporter:datatype="link" />
3201             <field reporter:label="Record" name="record" reporter:datatype="link" />
3202             <field reporter:label="Record is temporary?" name="temporary_record" reporter:datatype="bool" />
3203             <field reporter:label="Item Relationship" name="relationship" reporter:datatype="text" />
3204             <field reporter:label="Original Status" name="original_status" reporter:datatype="link" />
3205             <field reporter:label="Original Circ Modifier" name="original_circ_modifier" reporter:datatype="link" />
3206             <field reporter:label="Original Shelving Location" name="original_location" reporter:datatype="link" />
3207             <field reporter:label="Original Callnumber" name="original_callnumber" reporter:datatype="link" />
3208         </fields>
3209         <links>
3210             <link field="course" reltype="has_a" key="id" map="" class="acmc" />
3211             <link field="item" reltype="has_a" key="id" map="" class="acp" />
3212             <link field="record" reltype="has_a" key="id" map="" class="bre" />
3213             <link field="original_callnumber" reltype="has_a" key="id" map="" class="acn" />
3214             <link field="original_status" reltype="has_a" key="id" map="" class="ccs" />
3215             <link field="original_circ_modifier" reltype="has_a" key="code" map="" class="ccm" />
3216             <link field="original_location" reltype="has_a" key="id" map="" class="acpl" />
3217         </links>
3218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3219             <actions>
3220                 <create permission="MANAGE_RESERVES">
3221                                         <context link="course" field="owning_lib" />
3222                 </create>
3223                 <retrieve/>
3224                 <update permission="MANAGE_RESERVES">
3225                                         <context link="course" field="owning_lib" />
3226                 </update>
3227                 <delete permission="MANAGE_RESERVES">
3228                                         <context link="course" field="owning_lib" />
3229                 </delete>
3230             </actions>
3231         </permacrud>
3232     </class>
3233         <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">
3234                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_id_seq">
3235                         <field reporter:label="Term ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3236                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3237             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" oils_obj:required="true" />
3238                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3239                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3240                         <field reporter:label="Courses" name="courses" reporter:datatype="link" oils_persist:virtual="true"/>
3241                         <field reporter:label="Course Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
3242                 </fields>
3243                 <links>
3244             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
3245                         <link field="courses" reltype="has_many" key="term" map="course" class="acmtcm"/>
3246                         <link field="maps" reltype="has_many" key="term" map="" class="acmtcm"/>
3247                 </links>
3248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3249                         <actions>
3250                                 <create permission="MANAGE_RESERVES" context_field="owning_lib" />
3251                                 <retrieve/>
3252                                 <update permission="MANAGE_RESERVES" context_field="owning_lib" />
3253                                 <delete permission="MANAGE_RESERVES" context_field="owning_lib" />
3254                         </actions>
3255                 </permacrud>
3256         </class>
3257     <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">
3258         <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_term_course_map_id_seq">
3259             <field reporter:label="Course Term Map ID" name="id" reporter:datatype="id"/>
3260             <field reporter:label="Term" name="term" oils_obj:required="true" reporter:datatype="link"/>
3261             <field reporter:label="Course" name="course" reporter:datatype="link" oils_obj:required="true"/>
3262         </fields>
3263         <links>
3264             <link field="term" reltype="has_a" key="id" map="" class="acmt"/>
3265             <link field="course" reltype="has_a" key="id" map="" class="acmc"/>
3266         </links>
3267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3268             <actions>
3269                 <create permission="MANAGE_RESERVES">
3270                                         <context link="course" field="owning_lib" />
3271                 </create>
3272                 <retrieve/>
3273                 <update permission="MANAGE_RESERVES">
3274                                         <context link="course" field="owning_lib" />
3275                 </update>
3276                 <delete permission="MANAGE_RESERVES">
3277                                         <context link="course" field="owning_lib" />
3278                 </delete>
3279             </actions>
3280         </permacrud>
3281     </class>
3282         <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">
3283                 <fields oils_persist:primary="id" oils_persist:sequence="asset.course_module_role_id_seq">
3284                         <field reporter:label="Role ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3285                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
3286             <field reporter:label="OPAC Viewable?" name="is_public" reporter:datatype="bool" />
3287                 </fields>
3288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3289                         <actions>
3290                                 <create permission="MANAGE_RESERVES" global_required="true" />
3291                                 <retrieve/>
3292                                 <update permission="MANAGE_RESERVES" global_required="true" />
3293                                 <delete permission="MANAGE_RESERVES" global_required="true" />
3294                         </actions>
3295                 </permacrud>
3296         </class>
3297         
3298     <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">
3299         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3300             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3301             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3302             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3303             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3304         </fields>
3305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3306             <actions>
3307                 <retrieve/>
3308             </actions>
3309         </permacrud>
3310     </class>
3311         <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">
3312                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3313                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3314                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3315                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3316                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3317                 </fields>
3318                 <links>
3319                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3320                 </links>
3321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3322             <actions>
3323                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3324                 <retrieve/>
3325                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3326                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3327             </actions>
3328         </permacrud>
3329         </class>
3330         <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">
3331                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3332                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3333                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3334                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3335                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3336                 </fields>
3337                 <links>
3338                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3339                 </links>
3340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3341             <actions>
3342                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3343                 <retrieve/>
3344                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3345                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3346             </actions>
3347         </permacrud>
3348         </class>
3349         <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">
3350                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3351                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3352                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3353                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3354                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3355                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3356                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3357                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3358                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3359                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3360                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3361                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3362                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3363                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3364                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3365                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3366                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3367                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3368                         <field reporter:label="Dewey Classification" name="dewey" oils_persist:virtual="true" reporter:datatype="link"/>
3369                 </fields>
3370                 <links>
3371                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3372                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3373                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3374                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3375                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3376                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3377                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3378                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3379                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3380                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3381                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3382                         <link field="dewey" reltype="might_have" key="call_number" map="" class="racnd"/>
3383                 </links>
3384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3385             <actions>
3386                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3387                 <retrieve/>
3388                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3389                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3390             </actions>
3391         </permacrud>
3392         </class>
3393         <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">
3394                 <fields oils_persist:primary="call_number">
3395                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link" />
3396                         <field reporter:label="Dewey Number" name="dewey" reporter:datatype="text"/>
3397                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
3398                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
3399                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
3400                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
3401                 </fields>
3402                 <links>
3403                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3404                 </links>
3405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3406             <actions>
3407                 <retrieve/>
3408             </actions>
3409         </permacrud>
3410         </class>
3411         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3412                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3413                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3414                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3415                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3416                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3417                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3418                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3419                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3420                 </fields>
3421                 <links>
3422                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3423                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3424         </links>
3425         </class>
3426         <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">
3427                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3428                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3429                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3430                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3431                 </fields>
3432                 <links>
3433                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3434                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3435                 </links>
3436         </class>
3437         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3438                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3439                         <field name="id" reporter:datatype="id" />
3440                         <field name="value" oils_persist:i18n="true" />
3441                 </fields>
3442                 <links/>
3443         </class>
3444         <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">
3445                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3446                         <field name="balance_owed" reporter:datatype="money" />
3447                         <field name="total_owed" reporter:datatype="money" />
3448                         <field name="total_paid" reporter:datatype="money" />
3449                         <field name="usr" reporter:datatype="link"/>
3450                 </fields>
3451                 <links>
3452                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3453         </links>
3454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3455             <actions>
3456                 <retrieve permission="VIEW_USER">
3457                     <context link="usr" field="home_ou"/>
3458                 </retrieve>
3459             </actions>
3460         </permacrud>
3461         </class>
3462         <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">
3463                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3464                         <field name="balance_owed" reporter:datatype="money" />
3465                         <field name="total_owed" reporter:datatype="money" />
3466                         <field name="total_paid" reporter:datatype="money" />
3467                         <field name="usr" reporter:datatype="link"/>
3468                 </fields>
3469                 <links>
3470                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3471         </links>
3472         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3473             <actions>
3474                 <retrieve permission="VIEW_USER">
3475                     <context link="usr" field="home_ou"/>
3476                 </retrieve>
3477             </actions>
3478         </permacrud>
3479         </class>
3480         <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">
3481                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3482                         <field name="collector" />
3483                         <field name="enter_time" reporter:datatype="timestamp"/>
3484                         <field name="id" reporter:datatype="id" />
3485                         <field name="location" reporter:datatype="link"/>
3486                         <field name="usr" reporter:datatype="link"/>
3487                 </fields>
3488                 <links>
3489                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3490                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3491                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3492                 </links>
3493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3494             <actions>
3495                 <create permission="money.collections_tracker.create" context_field="location"/>
3496                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3497                 <delete permission="money.collections_tracker.create" context_field="location"/>
3498             </actions>
3499         </permacrud>
3500         </class>
3501         <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">
3502                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3503                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3504                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3505                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3506                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3507                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3508                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3509                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3510                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3511                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3512                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3513                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3514                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3515                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3516                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3517                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3518                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3519                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3520                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3521                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3522                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3523                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3524                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3525                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3526                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3527                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3528                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3529                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3530                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3531                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3532                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3533                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3534                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3535                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3536                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3537                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3538                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3539                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3540                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3541                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3542                 </fields>
3543                 <links>
3544                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3545                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3546                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3547                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3548                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3549                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3550                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3551                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3552                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3553                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3554                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3555                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3556                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3557                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3558                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3559                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3560                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3561                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3562                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3563                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3564                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3565                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3566                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3567                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3568                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3569                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3570                 </links>
3571         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3572             <actions>
3573                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3574                 <retrieve/>
3575                 <update permission="UPDATE_MARC" global_required="true"/>
3576                 <!-- 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. -->
3577                 <delete permission="DELETE_RECORD" global_required="true"/>
3578             </actions>
3579         </permacrud>
3580         </class>
3581         <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">
3582                 <fields oils_persist:primary="id">
3583                         <field name="dow_0_close" />
3584                         <field name="dow_0_open" />
3585                         <field name="dow_1_close" />
3586                         <field name="dow_1_open" />
3587                         <field name="dow_2_close" />
3588                         <field name="dow_2_open" />
3589                         <field name="dow_3_close" />
3590                         <field name="dow_3_open" />
3591                         <field name="dow_4_close" />
3592                         <field name="dow_4_open" />
3593                         <field name="dow_5_close" />
3594                         <field name="dow_5_open" />
3595                         <field name="dow_6_close" />
3596                         <field name="dow_6_open" />
3597                         <field name="id" reporter:datatype="id" />
3598                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3599                 </fields>
3600                 <links>
3601                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3602                 </links>
3603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3604             <actions>
3605                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3606                 <retrieve/>
3607                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3608                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3609             </actions>
3610         </permacrud>
3611         </class>
3612         <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">
3613                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3614                         <field name="id" reporter:datatype="id" />
3615                         <field name="record" reporter:datatype="link"/>
3616                         <field name="label" reporter:datatype="text"/>
3617                         <field name="label_sortkey" reporter:datatype="text"/>
3618                         <field name="deleted" reporter:datatype="bool"/>
3619                 </fields>
3620                 <links>
3621                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3622                 </links>
3623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3624             <actions>
3625                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3626                 <retrieve/>
3627                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3628                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3629             </actions>
3630         </permacrud>
3631         </class>
3632         <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">
3633                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3634                         <field name="id" reporter:datatype="id" />
3635                         <field name="target_copy" reporter:datatype="link" />
3636                         <field name="part" reporter:datatype="link"/>
3637                 </fields>
3638                 <links>
3639                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3640                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3641                 </links>
3642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3643             <actions>
3644                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3645                 <retrieve/>
3646                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3647                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3648             </actions>
3649         </permacrud>
3650         </class>
3651     <class  id="aecc"
3652             controller="open-ils.cstore open-ils.pcrud"
3653             oils_obj:fieldmapper="action::emergency_closing_circulation"
3654             oils_persist:tablename="action.emergency_closing_circulation"
3655             reporter:label="Emergency Closing Circulation Entry"
3656             oils_persist:readonly="true"
3657     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3658         <fields oils_persist:primary="id">
3659             <field name="id" reporter:datatype="id" />
3660             <field name="circulation" reporter:datatype="link" />
3661                         <field name="emergency_closing" reporter:datatype="link"/>
3662             <field name="original_due_date" reporter:datatype="timestamp" />
3663             <field name="process_time" reporter:datatype="timestamp" />
3664         </fields>
3665         <links>
3666             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3667             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3668         </links>
3669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3670             <actions>
3671                 <retrieve/>
3672             </actions>
3673         </permacrud>
3674     </class>
3675     <class  id="aecr"
3676             controller="open-ils.cstore open-ils.pcrud"
3677             oils_obj:fieldmapper="action::emergency_closing_reservation"
3678             oils_persist:tablename="action.emergency_closing_reservation"
3679             reporter:label="Emergency Closing Reservation Entry"
3680             oils_persist:readonly="true"
3681     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3682         <fields oils_persist:primary="id">
3683             <field name="id" reporter:datatype="id" />
3684             <field name="reservation" reporter:datatype="link" />
3685                         <field name="emergency_closing" reporter:datatype="link"/>
3686             <field name="original_end_time" reporter:datatype="timestamp" />
3687             <field name="process_time" reporter:datatype="timestamp" />
3688         </fields>
3689         <links>
3690             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3691             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3692         </links>
3693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3694             <actions>
3695                 <retrieve/>
3696             </actions>
3697         </permacrud>
3698     </class>
3699     <class  id="aech"
3700             controller="open-ils.cstore open-ils.pcrud"
3701             oils_obj:fieldmapper="action::emergency_closing_hold"
3702             oils_persist:tablename="action.emergency_closing_hold"
3703             reporter:label="Emergency Closing Hold Entry"
3704             oils_persist:readonly="true"
3705     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3706         <fields oils_persist:primary="id">
3707             <field name="id" reporter:datatype="id" />
3708             <field name="hold" reporter:datatype="link" />
3709                         <field name="emergency_closing" reporter:datatype="link"/>
3710             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3711             <field name="process_time" reporter:datatype="timestamp" />
3712         </fields>
3713         <links>
3714             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3715             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3716         </links>
3717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3718             <actions>
3719                 <retrieve/>
3720             </actions>
3721         </permacrud>
3722     </class>
3723     <class  id="aecs"
3724             controller="open-ils.cstore open-ils.pcrud"
3725             oils_obj:fieldmapper="action::emergency_closing_status"
3726             oils_persist:tablename="action.emergency_closing_status"
3727             reporter:label="Emergency Closing Status"
3728             oils_persist:readonly="true"
3729     >
3730         <fields oils_persist:primary="id">
3731             <field name="id" reporter:datatype="id" />
3732             <field name="creator" reporter:datatype="link" />
3733             <field name="create_time" reporter:datatype="timestamp" />
3734             <field name="process_start_time" reporter:datatype="timestamp" />
3735             <field name="process_end_time" reporter:datatype="timestamp" />
3736             <field name="last_update_time" reporter:datatype="timestamp" />
3737             <field name="circulations" reporter:datatype="int" />
3738             <field name="circulations_complete" reporter:datatype="int" />
3739             <field name="reservations" reporter:datatype="int" />
3740             <field name="reservations_complete" reporter:datatype="int" />
3741             <field name="holds" reporter:datatype="int" />
3742             <field name="holds_complete" reporter:datatype="int" />
3743         </fields>
3744         <links>
3745             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3746         </links>
3747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3748             <actions>
3749                 <retrieve/>
3750             </actions>
3751         </permacrud>
3752     </class>
3753     <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">
3754         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3755             <field name="id" reporter:datatype="id" />
3756             <field name="creator" reporter:datatype="link" />
3757             <field name="create_time" reporter:datatype="timestamp" />
3758             <field name="process_start_time" reporter:datatype="timestamp" />
3759             <field name="process_end_time" reporter:datatype="timestamp" />
3760             <field name="last_update_time" reporter:datatype="timestamp" />
3761             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3762             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3763             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3764             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3765             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3766         </fields>
3767         <links>
3768             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3769             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3770             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3771             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3772             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3773             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3774         </links>
3775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3776             <actions>
3777                 <create permission="EMERGENCY_CLOSING">
3778                     <context link="closing" field="org_unit" />
3779                 </create>
3780                 <retrieve/>
3781                 <update permission="EMERGENCY_CLOSING">
3782                     <context link="closing" field="org_unit" />
3783                 </update>
3784                 <delete permission="EMERGENCY_CLOSING">
3785                     <context link="closing" field="org_unit" />
3786                 </delete>
3787             </actions>
3788         </permacrud>
3789     </class>
3790         <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">
3791                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3792                         <field name="close_end" reporter:datatype="timestamp" />
3793                         <field name="close_start" reporter:datatype="timestamp" />
3794                         <field name="id" reporter:datatype="id" />
3795                         <field name="org_unit" reporter:datatype="org_unit"/>
3796                         <field name="reason" reporter:datatype="text"/>
3797                         <field name="full_day" reporter:datatype="bool"/>
3798                         <field name="multi_day" reporter:datatype="bool"/>
3799                         <field name="emergency_closing" reporter:datatype="link"/>
3800                 </fields>
3801                 <links>
3802                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3803                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3804                 </links>
3805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3806             <actions>
3807                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3808                 <retrieve/>
3809                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3810                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3811             </actions>
3812         </permacrud>
3813         </class>
3814         <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">
3815                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3816                         <field name="extended" reporter:datatype="interval"/>
3817                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3818                         <field name="max_renewals" reporter:datatype="int" />
3819                         <field name="name" reporter:datatype="text"/>
3820                         <field name="normal" reporter:datatype="interval"/>
3821                         <field name="shrt" reporter:datatype="interval"/>
3822                         <field name="max_auto_renewals" reporter:datatype="int" />
3823                 </fields>
3824                 <links>
3825                 </links>
3826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3827             <actions>
3828                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3829                 <retrieve/>
3830                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3831                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3832             </actions>
3833         </permacrud>
3834         </class>
3835
3836         <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">
3837                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3838                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3839                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3840             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3841                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3842             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3843                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3844                                 reporter:datatype="link" config_field="true"/>
3845                 </fields>
3846                 <links>
3847             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3848                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3849                 </links>
3850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3851             <actions>
3852                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3853                 <retrieve/>
3854                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3855                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3856             </actions>
3857                 </permacrud>
3858         </class>
3859
3860         <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">
3861                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3862                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3863                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3864                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3865             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3866                 </fields>
3867                 <links>
3868                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3869                 </links>
3870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3871             <actions>
3872                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3873                 <retrieve/>
3874                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3875                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3876             </actions>
3877                 </permacrud>
3878         </class>
3879
3880         <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">
3881                 <fields oils_persist:primary="id" oils_persist:sequence="">
3882                         <field name="balance_owed" reporter:datatype="money"/>
3883                         <field name="id" reporter:datatype="id" />
3884                         <field name="last_billing_note" reporter:datatype="text"/>
3885                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3886                         <field name="last_billing_type" reporter:datatype="text"/>
3887                         <field name="last_payment_note" reporter:datatype="text"/>
3888                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3889                         <field name="last_payment_type" reporter:datatype="text"/>
3890                         <field name="total_owed" reporter:datatype="money"/>
3891                         <field name="total_paid" reporter:datatype="money"/>
3892                         <field name="usr" reporter:datatype="link"/>
3893                         <field name="xact_finish" reporter:datatype="timestamp" />
3894                         <field name="xact_start" reporter:datatype="timestamp" />
3895                         <field name="xact_type" reporter:datatype="text"/>
3896                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3897                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3898                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3899                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3900                         <field name="billing_location" reporter:datatype="link"/>
3901                 </fields>
3902                 <links>
3903                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3904                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3905                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3906                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3907                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3908                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3909                 </links>
3910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3911                         <actions>
3912                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3913                                         <context link="usr" field="home_ou" />
3914                                 </retrieve>
3915                         </actions>
3916                 </permacrud>
3917         </class>
3918         <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">
3919                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3920                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3921                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3922                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3923                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3924                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3925                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3926                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3927                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3928                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3929                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3930                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3933                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3934                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3935                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3936                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3937                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3938                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3939                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3940                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3941                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3942                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3943                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3944                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3945                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3946                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3947                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3948                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
3949                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3950                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3951                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3952                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3953                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3954                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3955                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3956                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3957                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3958                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3959                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3960                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3961                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3962                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3963                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3964                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3965                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3966                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3967                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3968                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3969                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3970                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3971                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3972                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3973                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3974                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3975                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3976                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3977                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3978                         <field reporter:label="Name Keyword internal tsvector" name="name_kw_tsvector" reporter:datatype="text"/>
3979                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3980                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3981                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3982                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3983                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3984                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3985                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3986                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3987                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3988                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3989                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3990                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3991                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3992                 </fields>
3993                 <links>
3994                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3995                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3996                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3997                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3998                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3999                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
4000                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
4001                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
4002                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
4003                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
4004                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
4005                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
4006                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
4007                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
4008                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
4009                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
4010                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
4011                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
4012                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
4013                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
4014                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
4015                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
4016                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
4017                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
4018                         <link field="notes" reltype="has_many" key="usr" map="" class="aum"/>
4019                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
4020                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
4021                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
4022                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
4023                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
4024                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
4025                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
4026                 </links>
4027                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4028                         <actions>
4029                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
4030                         </actions>
4031                 </permacrud>
4032         </class>
4033         <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">
4034                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
4035                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
4036                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
4037                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
4038                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
4039                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
4040                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
4041                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
4042                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
4043         </fields>
4044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4045                         <actions>
4046                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4047                                 <retrieve/>
4048                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4049                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
4050                         </actions>
4051                 </permacrud>
4052         </class>
4053         <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">
4054                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
4055                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4056                         <field name="usr" reporter:label="User" reporter:datatype="link" />
4057                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
4058                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
4059         </fields>
4060         <links>
4061                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4062                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
4063                 </links>
4064                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4065                         <actions>
4066                                 <retrieve permission="RUN_REPORTS">
4067                                         <context link="usr" field="home_ou" />
4068                                 </retrieve>
4069                         </actions>
4070                 </permacrud>
4071         </class>
4072         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
4073                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
4074                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4075                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
4076                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
4077                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
4078                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
4079                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
4080         </fields>
4081         <links>
4082                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
4083                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
4084                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
4085                 </links>
4086                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4087                         <actions>
4088                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
4089                                         <context link="usr" field="home_ou" />
4090                                         <context link="ws" field="owning_lib" />
4091                                 </retrieve>
4092                                 <create permission="ADMIN_TOOLBAR" context_field="org">
4093                                         <context link="usr" field="home_ou" />
4094                                         <context link="ws" field="owning_lib" />
4095                                 </create>
4096                                 <update permission="ADMIN_TOOLBAR" context_field="org">
4097                                         <context link="usr" field="home_ou" />
4098                                         <context link="ws" field="owning_lib" />
4099                                 </update>
4100                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
4101                                         <context link="usr" field="home_ou" />
4102                                         <context link="ws" field="owning_lib" />
4103                                 </delete>
4104                         </actions>
4105                 </permacrud>
4106         </class>
4107         <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">
4108                 <fields oils_persist:primary="name">
4109                         <field name="name" reporter:datatype="text"/>
4110                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4111                 </fields>
4112                 <links/>
4113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4114                         <actions>
4115                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4116                                 <retrieve/>
4117                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4118                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
4119                         </actions>
4120                 </permacrud>
4121         </class>
4122         <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">
4123                 <fields oils_persist:primary="name">
4124                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
4125                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
4126                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
4127                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
4128                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
4129                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
4130                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
4131                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
4132                 </fields>
4133                 <links>
4134                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
4135                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4136                 </links>
4137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4138                         <actions>
4139                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4140                                 <retrieve/>
4141                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4142                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
4143                         </actions>
4144                 </permacrud>
4145         </class>
4146         <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">
4147                 <fields oils_persist:primary="name">
4148                         <field name="name" reporter:datatype="text"/>
4149                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4150                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4151                         <field name="datatype" reporter:datatype="text"/>
4152                         <field name="view_perm" reporter:datatype="link"/>
4153                         <field name="update_perm" reporter:datatype="link"/>
4154                         <field name="fm_class" reporter:datatype="text"/>
4155                         <field name="grp" reporter:datatype="link"/>
4156                 </fields>
4157                 <links>
4158                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
4159                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
4160                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
4161                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
4162                 </links>
4163                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4164                         <actions>
4165                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4166                                 <retrieve/>
4167                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4168                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
4169                         </actions>
4170                 </permacrud>
4171         </class>
4172         <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">
4173                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
4174                         <field name="id" />
4175                         <field name="name"  reporter:datatype="text"/>
4176                         <field name="org_unit" reporter:datatype="org_unit"/>
4177                         <field name="value"  reporter:datatype="text"/>
4178                 </fields>
4179                 <links>
4180                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4181                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
4182                 </links>
4183         </class>
4184         <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">
4185                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
4186                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4187                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
4188                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
4189                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
4190                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
4191                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
4192                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
4193                 </fields>
4194                 <links>
4195                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4196                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4197                 </links>
4198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4199             <actions>
4200                 <create permission="CREATE_COPY_NOTE">
4201                     <context link="owning_copy" field="circ_lib"/>
4202                 </create>
4203                 <retrieve permission="VIEW_COPY_NOTES">
4204                     <context link="owning_copy" field="circ_lib"/>
4205                 </retrieve>
4206                 <update permission="UPDATE_COPY_NOTE">
4207                     <context link="owning_copy" field="circ_lib"/>
4208                 </update>
4209                 <delete permission="DELETE_COPY_NOTE">
4210                     <context link="owning_copy" field="circ_lib"/>
4211                 </delete>
4212             </actions>
4213         </permacrud>
4214         </class>
4215         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
4216                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
4217                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
4218                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
4219                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
4220                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4221                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
4222                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
4223                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
4224                 </fields>
4225                 <links>
4226                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4227                 </links>
4228         </class>
4229         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
4230                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
4231                         <field name="fingerprint"  reporter:datatype="text"/>
4232                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
4233                         <field name="master_record" reporter:datatype="link"/>
4234                         <field name="mods"  reporter:datatype="text"/>
4235                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
4236                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4237                 </fields>
4238                 <links>
4239                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
4240                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
4241                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
4242                 </links>
4243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4244                         <actions>
4245                                 <retrieve/>
4246                         </actions>
4247                 </permacrud>
4248         </class>
4249         <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">
4250                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
4251                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4252                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4253                 </fields>
4254                 <links/>
4255         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4256             <actions>
4257                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
4258                 <retrieve/>
4259                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
4260                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
4261             </actions>
4262         </permacrud>
4263         </class>
4264         <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">
4265                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
4266                         <field name="code"  reporter:datatype="text"/>
4267                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
4268                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
4269                 </fields>
4270                 <links/>
4271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4272             <actions>
4273                 <create permission="CREATE_PERM" global_required="true"/>
4274                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
4275                 <update permission="UPDATE_PERM" global_required="true"/>
4276                 <delete permission="DELETE_PERM" global_required="true"/>
4277             </actions>
4278         </permacrud>
4279         </class>
4280         <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">
4281                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
4282                         <field name="id" reporter:datatype="id" />
4283                         <field name="metarecord" reporter:datatype="link"/>
4284                         <field name="source" reporter:datatype="link"/>
4285                 </fields>
4286                 <links>
4287                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4288                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4289                 </links>
4290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4291                         <actions>
4292                                 <retrieve/>
4293                         </actions>
4294                 </permacrud>
4295         </class>
4296         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4297                         oils_obj:fieldmapper="metabib::display_entry" 
4298                         oils_persist:tablename="metabib.display_entry" 
4299                         oils_persist:field_safe="true"
4300                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4301                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4302                         <field name="id" reporter:datatype="id" />
4303                         <field name="field" reporter:datatype="link"/>
4304                         <field name="source" reporter:datatype="link"/>
4305                         <field name="value"  reporter:datatype="text"/>
4306                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4307                 </fields>
4308                 <links>
4309                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4310                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4311                 </links>
4312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4313                         <actions>
4314                                 <retrieve/>
4315                         </actions>
4316                 </permacrud>
4317         </class>
4318         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4319                 oils_persist:tablename="metabib.flat_display_entry"
4320                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4321                 oils_persist:field_safe="true"
4322                 reporter:label="Flat Display Entry" 
4323                 oils_persist:readonly="true">
4324                 <fields>
4325                         <field name="source" reporter:datatype="id" />
4326                         <field name="name" reporter:datatype="text"/>
4327                         <field name="multi" reporter:datatype="bool"/>
4328                         <field name="label" reporter:datatype="text"/>
4329                         <field name="field" reporter:datatype="link"/>
4330                         <field name="value" reporter:datatype="text"/>
4331                 </fields>
4332                 <links>
4333                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4334                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4335                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4336                 </links>
4337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4338                         <actions>
4339                                 <retrieve/>
4340                         </actions>
4341                 </permacrud>
4342         </class>
4343         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4344                 oils_persist:tablename="metabib.compressed_display_entry"
4345                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4346                 oils_persist:field_safe="true"
4347                 reporter:label="Compressed Display Entry" 
4348                 oils_persist:readonly="true">
4349                 <fields>
4350                         <field name="source" reporter:datatype="id" />
4351                         <field name="name" reporter:datatype="text"/>
4352                         <field name="multi" reporter:datatype="bool"/>
4353                         <field name="label" reporter:datatype="text"/>
4354                         <field name="field" reporter:datatype="link"/>
4355                         <field name="value" reporter:datatype="text"/>
4356                 </fields>
4357                 <links>
4358                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4359                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4360                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4361                 </links>
4362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4363                         <actions>
4364                                 <retrieve/>
4365                         </actions>
4366                 </permacrud>
4367         </class>
4368         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4369                 oils_persist:tablename="metabib.wide_display_entry"
4370                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4371                 oils_persist:field_safe="true"
4372                 reporter:label="Wide Display Entry" 
4373                 oils_persist:readonly="true">
4374                 <fields oils_persist:primary="source">
4375                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4376                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4377                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4378                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4379                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4380                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4381                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4382                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4383                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4384                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4385                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4386                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4387                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4388                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4389                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4390                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4391                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4392                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4393                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4394                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4395                 </fields>
4396                 <links>
4397                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4398                 </links>
4399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4400                         <actions>
4401                                 <retrieve/>
4402                         </actions>
4403                 </permacrud>
4404         </class>
4405
4406         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4407                 oils_persist:tablename="config.display_field_map"
4408                 oils_obj:fieldmapper="config::display_field_map"
4409                 oils_persist:field_safe="true"
4410                 reporter:label="Display Field Map">
4411                 <fields oils_persist:primary="name">
4412                         <field name="name" reporter:datatype="text"/>
4413                         <field name="field" reporter:datatype="link"/>
4414                         <field name="multi" reporter:datatype="bool"/>
4415                 </fields>
4416                 <links>
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                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4423                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4424                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4425                         </actions>
4426                 </permacrud>
4427         </class>
4428
4429         <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">
4430                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4431                         <field name="id" reporter:datatype="id" />
4432                         <field name="field" reporter:datatype="link"/>
4433                         <field name="source" reporter:datatype="link"/>
4434                         <field name="value"  reporter:datatype="text"/>
4435                 </fields>
4436                 <links>
4437                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4438                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4439                 </links>
4440         </class>
4441         <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">
4442                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4443                         <field name="id" reporter:datatype="id" />
4444                         <field name="value" reporter:datatype="text"/>
4445                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4446                 </fields>
4447                 <links>
4448                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4449                 </links>
4450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4451                         <actions>
4452                                 <retrieve/>
4453                         </actions>
4454                 </permacrud>
4455         </class>
4456         <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">
4457                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4458                         <field name="id" reporter:datatype="id" />
4459                         <field name="entry" reporter:datatype="link"/>
4460                         <field name="def" reporter:datatype="link"/>
4461                         <field name="source" reporter:datatype="link"/>
4462                 </fields>
4463                 <links>
4464                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4465                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4466                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4467                 </links>
4468         </class>
4469         <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">
4470                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4471                         <field name="id" reporter:datatype="id" />
4472                         <field name="entry" reporter:datatype="link"/>
4473                         <field name="simple_heading" reporter:datatype="link"/>
4474                 </fields>
4475                 <links>
4476                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4477                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4478                 </links>
4479         </class>
4480         <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">
4481                 <oils_persist:source_definition><![CDATA[
4482                         SELECT * FROM metabib.author_field_entry
4483                                                 UNION ALL
4484                         SELECT * FROM metabib.keyword_field_entry
4485                                                 UNION ALL
4486                         SELECT * FROM metabib.identifier_field_entry
4487                                                 UNION ALL
4488                         SELECT * FROM metabib.title_field_entry
4489                                                 UNION ALL
4490                         SELECT * FROM metabib.subject_field_entry
4491                                                 UNION ALL
4492                         SELECT * FROM metabib.series_field_entry
4493                 ]]></oils_persist:source_definition>
4494                 <fields>
4495                         <field name="field" reporter:datatype="link"/>
4496                         <field name="id" reporter:datatype="id" />
4497                         <field name="source" reporter:datatype="link"/>
4498                         <field name="value"  reporter:datatype="text"/>
4499                 </fields>
4500                 <links>
4501                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4502                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4503                 </links>
4504         </class>
4505         <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">
4506                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4507                         <field name="field" reporter:datatype="link"/>
4508                         <field name="id" reporter:datatype="id" />
4509                         <field name="source" reporter:datatype="link"/>
4510                         <field name="value"  reporter:datatype="text"/>
4511                 </fields>
4512                 <links>
4513                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4514                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4515                 </links>
4516         </class>
4517         <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">
4518                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4519                         <field name="accepting_usr" reporter:datatype="link"/>
4520                         <field name="amount" reporter:datatype="money" />
4521                         <field name="amount_collected" reporter:datatype="money" />
4522                         <field name="cash_drawer" reporter:datatype="link"/>
4523                         <field name="id" reporter:datatype="id" />
4524                         <field name="note"  reporter:datatype="text"/>
4525                         <field name="payment_ts" reporter:datatype="timestamp"/>
4526                         <field name="xact" reporter:datatype="link"/>
4527                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4528                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4529                 </fields>
4530                 <links>
4531                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4532                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4533                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4534                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4535                 </links>
4536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4537             <actions>
4538                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4539                     <context link="xact" jump="usr" field="home_ou"/>
4540                 </retrieve>
4541                         </actions>
4542                 </permacrud>
4543         </class>
4544         <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">
4545                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4546                         <field name="accepting_usr" reporter:datatype="link"/>
4547                         <field name="amount" reporter:datatype="money" />
4548                         <field name="amount_collected" reporter:datatype="money" />
4549                         <field name="id" reporter:datatype="id" />
4550                         <field name="note"  reporter:datatype="text"/>
4551                         <field name="payment_ts" reporter:datatype="timestamp"/>
4552                         <field name="xact" reporter:datatype="link"/>
4553                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4554                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4555                 </fields>
4556                 <links>
4557                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4558                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4559                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4560                 </links>
4561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4562             <actions>
4563                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4564                     <context link="xact" jump="usr" field="home_ou"/>
4565                 </retrieve>
4566                         </actions>
4567                 </permacrud>
4568         </class>
4569         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4570                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4571                         <field name="accepting_usr" reporter:datatype="link"/>
4572                         <field name="amount" reporter:datatype="money" />
4573                         <field name="amount_collected" reporter:datatype="money" />
4574                         <field name="id" reporter:datatype="id" />
4575                         <field name="note"  reporter:datatype="text"/>
4576                         <field name="payment_ts" reporter:datatype="timestamp"/>
4577                         <field name="xact" reporter:datatype="link"/>
4578                         <field name="billing" reporter:datatype="link"/>
4579                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4580                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4581                 </fields>
4582                 <links>
4583                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4584                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4585                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4586                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4587                 </links>
4588         </class>
4589         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4590                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4591                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4592                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4593                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4594                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4595                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4596                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4597                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4598                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4599                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4600                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4601                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4602                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4603                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4604                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4605                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4606                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4607                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4608                 </fields>
4609                 <links>
4610                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4611                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4612                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4613                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4614                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4615                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4616                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4617                 </links>
4618         </class>
4619
4620         <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">
4621                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4622                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4623                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4624                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4625                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4626                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4627                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4628                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4629                 </fields>
4630                 <links/>
4631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4632             <actions>
4633                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4634                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
4635                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4636                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4637             </actions>
4638         </permacrud>
4639         </class>
4640         <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">
4641                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4642                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4643                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4644                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4645                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4646                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4647                 </fields>
4648                 <links>
4649                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4650                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4651                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4652         </links>
4653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4654             <actions>
4655                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4656                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4657                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4658                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4659             </actions>
4660         </permacrud>
4661         </class>
4662         <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">
4663                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4664                         <field name="holdable" reporter:datatype="bool" reporter:label="Holdable"/>
4665                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4666                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
4667                         <field name="opac_visible" reporter:datatype="bool" reporter:label="OPAC Visible"/>
4668             <field name="copy_active" reporter:datatype="bool" reporter:label="Sets Item Active"/>
4669             <field name="restrict_copy_delete" reporter:datatype="bool" reporter:label="Restrict Deletion"/>
4670             <field name="is_available" reporter:datatype="bool" reporter:label="Available"/>
4671             <field name="hopeless_prone" reporter:datatype="bool" reporter:label="Prone to Hopeless Holds?"/>
4672                 </fields>
4673                 <links/>
4674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4675             <actions>
4676                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4677                 <retrieve/>
4678                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4679                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4680             </actions>
4681         </permacrud>
4682         </class>
4683         <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">
4684                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
4685                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4686                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4687                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4688                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4689                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4690                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4691                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4692                         <field name="usr_message" reporter:datatype="link" reporter:label="User Message"/>
4693                 </fields>
4694                 <links>
4695                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4696                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4697                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4698                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4699                         <link field="usr_message" reltype="has_a" key="id" map="" class="aum"/>
4700                 </links>
4701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4702                         <actions>
4703                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4704                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4705                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4706                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4707                         </actions>
4708                 </permacrud>
4709         </class>
4710         <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">
4711                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4712                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4713                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4714                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4715                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4716                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4717                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4718                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4719                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4720                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4721                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4722                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4723                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4724                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4725                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4726                 </fields>
4727                 <links>
4728                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4729                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4730                 </links>
4731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4732                         <actions>
4733                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4734                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4735                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4736                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4737                         </actions>
4738                 </permacrud>
4739         </class>
4740         <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">
4741                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4742                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4743                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4744                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4745                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4746                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4747                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4748                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4749                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4750                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4751                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4752                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4753                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4754                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4755                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4756                 </fields>
4757                 <links>
4758                         <link field="owner" 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   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4763                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4764                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4765                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4766                         </actions>
4767                 </permacrud>
4768         </class>
4769
4770
4771         <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">
4772                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4773                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4774                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4775                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4776                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4777                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4778                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4779                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4780                 </fields>
4781                 <links>
4782                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4783                 </links>
4784         </class>
4785
4786         <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">
4787                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4788                         <field name="call_number" />
4789                         <field name="create_date" reporter:datatype="timestamp"/>
4790                         <field name="creator" reporter:datatype="link"/>
4791                         <field name="id" reporter:datatype="id" />
4792                         <field name="pub" reporter:datatype="bool"/>
4793                         <field name="title"  reporter:datatype="text"/>
4794                         <field name="value"  reporter:datatype="text"/>
4795                 </fields>
4796                 <links>
4797                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4798                 </links>
4799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4800             <actions>
4801                 <create permission="CREATE_VOLUME_NOTE">
4802                     <context link="call_number" field="owning_lib"/>
4803                 </create>
4804                 <retrieve permission="VIEW_VOLUME_NOTES">
4805                     <context link="call_number" field="owning_lib"/>
4806                 </retrieve>
4807                 <update permission="UPDATE_VOLUME_NOTE">
4808                     <context link="call_number" field="owning_lib"/>
4809                 </update>
4810                 <delete permission="DELETE_VOLUME_NOTE">
4811                     <context link="call_number" field="owning_lib"/>
4812                 </delete>
4813             </actions>
4814         </permacrud>
4815         </class>
4816         <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">
4817                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4818                         <field name="create_date" reporter:datatype="timestamp"/>
4819                         <field name="creator" reporter:datatype="link"/>
4820                         <field name="edit_date" reporter:datatype="timestamp"/>
4821                         <field name="editor" reporter:datatype="link"/>
4822                         <field name="id" reporter:datatype="id" />
4823                         <field name="record" reporter:datatype="link"/>
4824                         <field name="value" reporter:datatype="text"/>
4825                 </fields>
4826                 <links>
4827                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4828                 </links>
4829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4830             <actions>
4831                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4832                 <retrieve/>
4833                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4834                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4835             </actions>
4836         </permacrud>
4837         </class>
4838         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4839         <oils_persist:source_definition><![CDATA[
4840 SELECT  usr,
4841         SUM(
4842             CASE
4843                 WHEN (
4844                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4845                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4846                 ) THEN 1
4847                 ELSE 0
4848             END
4849         ) AS out,
4850
4851         SUM(
4852             CASE
4853                 WHEN (
4854                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4855                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4856                 ) THEN 1
4857                 ELSE 0
4858             END
4859         ) AS overdue,
4860
4861         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4862         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4863         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4864   FROM  action.circulation
4865   WHERE checkin_time IS NULL
4866   GROUP BY 1
4867         ]]></oils_persist:source_definition>
4868         <fields oils_persist:primary="usr">
4869             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4870             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4871             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4872             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4873             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4874             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4875         </fields>
4876         <links>
4877             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4878         </links>
4879         </class>
4880         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4881         <oils_persist:source_definition><![CDATA[
4882 SELECT  usr,
4883         STRING_AGG(
4884             CASE
4885                 WHEN (
4886                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4887                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4888                 ) THEN id::TEXT
4889                 ELSE '0'
4890             END
4891         ,',') AS out,
4892
4893         STRING_AGG(
4894             CASE
4895                 WHEN (
4896                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4897                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4898                 ) THEN id::TEXT
4899                 ELSE '0'
4900             END
4901         ,',') AS overdue,
4902
4903         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4904         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4905         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4906   FROM  action.circulation
4907   WHERE checkin_time IS NULL
4908   GROUP BY 1
4909         ]]></oils_persist:source_definition>
4910         <fields oils_persist:primary="usr">
4911             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4912             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4913             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4914             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4915             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4916             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4917         </fields>
4918         <links>
4919             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4920         </links>
4921         </class>
4922         <class id="acsp" controller="open-ils.cstore" oils_obj:fieldmapper="action::curbside" oils_persist:tablename="action.curbside" reporter:label="Curbside Appointment Slot">
4923                 <fields oils_persist:primary="id" oils_persist:sequence="action.curbside_id_seq">
4924                         <field reporter:label="Appointment ID" name="id" reporter:datatype="id" />
4925                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
4926                         <field reporter:label="Pickup Library" name="org" reporter:datatype="org_unit"/>
4927                         <field reporter:label="Appointment Date/Time" name="slot" reporter:datatype="timestamp"/>
4928                         <field reporter:label="Staged" name="staged" reporter:datatype="timestamp"/>
4929                         <field reporter:label="Staging Staff" name="stage_staff" reporter:datatype="link"/>
4930                         <field reporter:label="Arrival Date/Time" name="arrival" reporter:datatype="timestamp"/>
4931                         <field reporter:label="Delivery Date/Time" name="delivered" reporter:datatype="timestamp"/>
4932                         <field reporter:label="Delivery Staff" name="delivery_staff" reporter:datatype="link"/>
4933                         <field reporter:label="Notes" name="notes" reporter:datatype="text"/>
4934                 </fields>
4935                 <links>
4936                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4937                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
4938                         <link field="stage_staff" reltype="has_a" key="id" map="" class="au"/>
4939                         <link field="delivery_staff" reltype="has_a" key="id" map="" class="au"/>
4940                 </links>
4941         </class>
4942         <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">
4943                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4944                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4945                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4946                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4947                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4948                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4949                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4950                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4951                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4952                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4953                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4954                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4955                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4956                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4957                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4958                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4959                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4960                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4961                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4962                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4963                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4964                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4965                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4966                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4967                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4968                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4969                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4970                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4971                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4972                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4973                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4974                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4975                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4976                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4977                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4978                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4979                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4980                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4981                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4982                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4983                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4984                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4985                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4986                 </fields>
4987                 <links>
4988                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4989                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4990                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4991                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4992                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4993                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4994                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4995                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4996                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4997                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4998                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4999                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5000                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5001                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5002                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5003                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5004                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5005                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
5006                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5007                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5008                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5009                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5010                 </links>
5011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5012                         <actions>
5013                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5014                         </actions>
5015                 </permacrud>
5016         </class>
5017         <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">
5018                 <fields>
5019                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
5020                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5021                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
5022                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5023                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
5024                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
5025                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
5026                 </fields>
5027                 <links>
5028                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5029                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5030                 </links>
5031                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5032                         <actions>
5033                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5034                         </actions>
5035                 </permacrud>
5036         </class>
5037         <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">
5038                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5039                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5040                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5041                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5042                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5043                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5044                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5045                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5046                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5047                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5048                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5049                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5050                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5051                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5052                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5053                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5054                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5055                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5056                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5057                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5058                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5059                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5060                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5061                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5062                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5063                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5064                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5065                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5066                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5067                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5068                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5069                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5070                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5071                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5072                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5073                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5074                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5075                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5076                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5077                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5078                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5079                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5080                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5081                 </fields>
5082                 <links>
5083                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5084                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5085                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5086                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5087                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5088                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5089                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5090                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5091                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5092                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5093                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5094                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5095                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5096                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5097                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5098                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5099                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5100                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5101                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5102                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5103                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5104                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5105                 </links>
5106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5107                         <actions>
5108                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5109                         </actions>
5110                 </permacrud>
5111         </class>
5112
5113         <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">
5114                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5115                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5116                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5117                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5118                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5119                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5120                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5121                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5122                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5123                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5124                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5125                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5126                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5127                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5128                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5129                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5130                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5131                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5132                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5133                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5134                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5135                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5136                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5137                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5138                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5139                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5140                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5141                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5142                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5144                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
5145                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5146                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5147                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5148                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5149                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5150                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5151                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5152                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5153                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5154                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5155                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5156                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5157                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5158                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5159                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5160                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5161                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5162                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5163                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5164                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5165                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5166                 </fields>
5167                 <links>
5168                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5169                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5170                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5171                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5172                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5173                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5174                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5175                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5176                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5177                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5178                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5179                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5180                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5181                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5182                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5183                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5184                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5185                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5186                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5187                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5188                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5189                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5190                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5191                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5192                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5193                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
5194                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
5195                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
5196                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5197                 </links>
5198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5199                         <actions>
5200                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
5201                         </actions>
5202                 </permacrud>
5203         </class>
5204         <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">
5205                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5206                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
5207                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
5208                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
5209                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5210                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
5211                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
5212                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
5213                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
5214                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
5215                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5216                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
5217                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
5218                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
5219                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
5220                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
5221                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
5222                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
5223                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
5224                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
5225                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
5226                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
5227                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5228                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5229                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
5230                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
5231                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
5232                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
5233                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
5234                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
5235                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
5236                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5237                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5238                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5239                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
5240                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5241                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5242                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5243                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5244                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5245                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
5246                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
5247                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
5248                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
5249                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
5250                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5251                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5252                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
5253                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
5254                 </fields>
5255                 <links>
5256                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5257                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
5258                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
5259                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5260                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
5261                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5262                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
5263                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
5264                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5265                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5266                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5267                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5268                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5269                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5270                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
5271                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5272                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5273                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5274                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
5275                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
5276                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
5277                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
5278                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
5279                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
5280                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
5281                 </links>
5282         </class>
5283         <class id="auch" 
5284                 controller="open-ils.cstore" 
5285                 oils_obj:fieldmapper="action::user_circ_history" 
5286                 oils_persist:tablename="action.usr_circ_history" 
5287                 reporter:label="User Checkout History">
5288                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
5289                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5290                         <!-- prevent reporting on the user that owns the checkout history -->
5291                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
5292                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
5293                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
5294                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
5295                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
5296                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
5297                 </fields>
5298                 <links>
5299                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5300                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5301                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
5302                 </links>
5303         </class>
5304         <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">
5305                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
5306                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5307                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5308                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5309                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5310                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5311                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5312                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5313                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5314                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5315                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5316                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5317                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5319                 </fields>
5320                 <links>
5321                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5322                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5323                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5324                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5325                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5326                 </links>
5327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5328                         <actions>
5329                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5330                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5331                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5332                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5333                         </actions>
5334                 </permacrud>
5335         </class>
5336
5337         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5338                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5339                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5340                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5341                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5342                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5343                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5344                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5345                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5346                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5347                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5348                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5349                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5350                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5351                 </fields>
5352                 <links>
5353                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5354                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5355                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5356                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5357                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5358                 </links>
5359                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5360                         <actions>
5361                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5362                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5363                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5364                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5365                         </actions>
5366                 </permacrud>
5367         </class>
5368         
5369         <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">
5370                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5371                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5372                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5373                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5374                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5375                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5376                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5377                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5378                 </fields>
5379                 <links>
5380                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5381                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5382                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5383                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5384                 </links>
5385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5386                         <actions>
5387                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5388                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5389                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5390                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5391                         </actions>
5392                 </permacrud>
5393         </class>
5394         
5395         <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">
5396                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5397                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5398                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5399                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5400                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5401                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5402                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5403                 </fields>
5404                 <links>
5405                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5406                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5407                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5408                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5409                 </links>
5410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5411                         <actions>
5412                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5413                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5414                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5415                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5416                         </actions>
5417                 </permacrud>
5418         </class>
5419         
5420         <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">
5421                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5422                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5423                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5424                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5425                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5426                 </fields>
5427                 <links>
5428                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5429                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5430                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5431                 </links>
5432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5433                         <actions>
5434                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5435                     <context link="resource" field="owner" />
5436                 </create>
5437                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5438                     <context link="resource" field="owner" />
5439                 </retrieve>
5440                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5441                     <context link="resource" field="owner" />
5442                 </update>
5443                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5444                     <context link="resource" field="owner" />
5445                 </delete>
5446                         </actions>
5447                 </permacrud>
5448         </class>
5449         
5450         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5451                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5452                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5453                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5454                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5455                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5456                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5457                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5458                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5459                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5460                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5461                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5462                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5463                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5464                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5465                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5466                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5467                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5468                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5469                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5470                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5471                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5472                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5473                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5474                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5475                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5476                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5477                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5478                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5479                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5480                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5481                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5482                 </fields>
5483                 <links>
5484                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5485                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5486                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5487                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5488                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5489                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5490                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5491                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5492                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5493                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5494                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5495                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5496                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5497                 </links>
5498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5499                         <actions>
5500                                 <create permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5501                                 <retrieve permission="VIEW_BOOKING_RESERVATION" context_field="pickup_lib"/>
5502                                 <update permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5503                                 <delete permission="ADMIN_BOOKING_RESERVATION" context_field="pickup_lib"/>
5504                         </actions>
5505                 </permacrud>
5506         </class>
5507         
5508         <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">
5509                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5510                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5511                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5512                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5513                 </fields>
5514                 <links>
5515                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5516                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5517                 </links>
5518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5519                         <actions>
5520                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5521                                         <context link="reservation" field="pickup_lib"/>
5522                                 </create>
5523                                 <retrieve permission="VIEW_BOOKING_RESERVATION_ATTR_MAP">
5524                                         <context link="reservation" field="pickup_lib"/>
5525                                 </retrieve>
5526                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5527                                         <context link="reservation" field="pickup_lib"/>
5528                                 </update>
5529                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP">
5530                                         <context link="reservation" field="pickup_lib"/>
5531                                 </delete>
5532                         </actions>
5533                 </permacrud>
5534         </class>
5535
5536         <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">
5537                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5538                         <field name="bucket" reporter:datatype="link"/>
5539                         <field name="id" reporter:datatype="id" />
5540                         <field name="target_call_number" reporter:datatype="link" />
5541                         <field name="create_time" reporter:datatype="timestamp" />
5542                         <field name="pos" reporter:datatype="int" />
5543                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5544                 </fields>
5545                 <links>
5546                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5547                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5548             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5549                 </links>
5550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5551                         <actions>
5552                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5553                     <context link="bucket" owning_lib="owning_lib"/>
5554                 </retrieve>
5555             </actions>
5556         </permacrud>
5557         </class>
5558         <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">
5559                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5560                         <field name="id" reporter:datatype="id" />
5561                         <field name="item" reporter:datatype="link"/>
5562                         <field name="note" reporter:datatype="text" />
5563                 </fields>
5564                 <links>
5565                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5566                 </links>
5567         </class>
5568         <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">
5569                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5570                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5571                         <field name="btype" reporter:datatype="text"/>
5572                         <field name="id" reporter:datatype="id" />
5573                         <field name="name" reporter:datatype="text"/>
5574                         <field name="description" reporter:datatype="text"/>
5575                         <field name="owner" reporter:datatype="link"/>
5576                         <field name="pub" reporter:datatype="bool"/>
5577                         <field name="create_time" reporter:datatype="timestamp" />
5578                         <field name="owning_lib" reporter:datatype="org_unit" />
5579                 </fields>
5580                 <links>
5581                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5582                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5583                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5584                 </links>
5585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5586                         <actions>
5587                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5588                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5589                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5590                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5591                         </actions>
5592                 </permacrud>
5593         </class>
5594         <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">
5595                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5596                         <field name="id" reporter:datatype="id" />
5597                         <field name="bucket" reporter:datatype="link"/>
5598                         <field name="note" reporter:datatype="text" />
5599                 </fields>
5600                 <links>
5601                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5602                 </links>
5603         </class>
5604         <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">
5605                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5606                         <field name="hold" reporter:datatype="link"/>
5607                         <field name="id" reporter:datatype="id" />
5608                         <field name="target_copy" reporter:datatype="link"/>
5609                         <field name="proximity" reporter:datatype="number"/>
5610                 </fields>
5611                 <links>
5612                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5613                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5614                 </links>
5615         </class>
5616         <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">
5617                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5618                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5619                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5620                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5621                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5622                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5623                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5624                 </fields>
5625                 <links>
5626                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5627                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5628                 </links>
5629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5630             <actions>
5631                 <create permission="CREATE_HOLD_NOTIFICATION">
5632                                         <context link="hold" jump="usr" field="home_ou" />
5633                                 </create>
5634                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5635                                         <context link="hold" jump="usr" field="home_ou" />
5636                                 </retrieve>
5637                 <update permission="CREATE_HOLD_NOTIFICATION">
5638                                         <context link="hold" jump="usr" field="home_ou" />
5639                                 </update>
5640                 <delete permission="CREATE_HOLD_NOTIFICATION">
5641                                         <context link="hold" jump="usr" field="home_ou" />
5642                                 </delete>
5643             </actions>
5644         </permacrud>
5645         </class>
5646         <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">
5647                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5648                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5649                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5650                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5651                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5652                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5653                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5654                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5655                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5656                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5657                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5658                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5659                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5660                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5661                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5662                 </fields>
5663                 <links>
5664                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5665                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5666                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5667                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5668                 </links>
5669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5670             <actions>
5671                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5672                 <retrieve/>
5673                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5674                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5675             </actions>
5676         </permacrud>
5677         </class>
5678         <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">
5679                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5680                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5681                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5682                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5683                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" />
5684             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5685             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5686             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5687                 </fields>
5688                 <links>
5689                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5690                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5691                 </links>
5692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5693             <actions>
5694                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5695                 <retrieve/>
5696                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5697                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5698             </actions>
5699         </permacrud>
5700         </class>
5701         <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">
5702                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5703                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5704             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5705             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5706                 </fields>
5707                 <links>
5708                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5709                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5710                 </links>
5711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5712             <actions>
5713                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5714                                         <context link="lgroup" field="owner" />
5715                 </create>
5716                 <retrieve/>
5717                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5718                                         <context link="lgroup" field="owner" />
5719                 </update>
5720                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5721                                         <context link="lgroup" field="owner" />
5722                 </delete>
5723             </actions>
5724         </permacrud>
5725         </class>
5726
5727     <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">
5728         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5729             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5730             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5731             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5732             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5733         </fields>
5734         <links>
5735             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5736             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5737         </links>
5738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5739             <actions>
5740                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5741                 <retrieve/>
5742                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5743                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5744             </actions>
5745         </permacrud>
5746     </class>
5747
5748         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5749                 <fields>
5750                         <field name="sre_id" oils_persist:virtual="true" />
5751                         <field name="location" oils_persist:virtual="true" />
5752                         <field name="owning_lib" oils_persist:virtual="true" />
5753                         <field name="basic_holdings" oils_persist:virtual="true" />
5754                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5755                         <field name="supplement_holdings" oils_persist:virtual="true" />
5756                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5757                         <field name="index_holdings" oils_persist:virtual="true" />
5758                         <field name="index_holdings_add" oils_persist:virtual="true" />
5759                         <field name="online" oils_persist:virtual="true" />
5760                         <field name="missing" oils_persist:virtual="true" />
5761                         <field name="incomplete" oils_persist:virtual="true" />
5762                 </fields>
5763         </class>
5764
5765         <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">
5766                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5767                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5768                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5769                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5770                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5771                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5772                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5773                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5774                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5775                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5776                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5777                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5778                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5779                 </fields>
5780                 <links>
5781                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5782                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5783                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5784                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5785                 </links>
5786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5787                         <actions>
5788                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5789                                 <retrieve/>
5790                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5791                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5792                         </actions>
5793                 </permacrud>
5794         </class>
5795
5796         <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">
5797                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5798                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5799                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5800                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5801                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5802                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5803                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5804                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5805                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5806                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5807                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5808                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5809                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5810                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5811                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5812                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5813                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5814                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5815                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5816                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5817                 </fields>
5818                 <links>
5819                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5820                 </links>
5821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5822                         <actions>
5823                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5824                                         <context link="subscription" field="owning_lib" />
5825                                 </create>
5826                                 <retrieve />
5827                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5828                                         <context link="subscription" field="owning_lib" />
5829                                 </update>
5830                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5831                                         <context link="subscription" field="owning_lib" />
5832                                 </delete>
5833                         </actions>
5834                 </permacrud>
5835         </class>
5836
5837         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5838                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5839                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5840                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5841                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5842                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5843                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5844                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5845                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5846                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5847                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5848                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5849                 </fields>
5850                 <links>
5851                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5852                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5853                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5854                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5855                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5856                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5857                 </links>
5858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5859                         <actions>
5860                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5861                                 <retrieve />
5862                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5863                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5864                         </actions>
5865                 </permacrud>
5866         </class>
5867
5868         <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">
5869                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5870                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5871                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5872                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5873                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5874                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5875                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5876                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5877                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5878                 </fields>
5879                 <links>
5880                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5881                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5882                 </links>
5883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5884                         <actions>
5885                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5886                     <context link="subscription" field="owning_lib"/>
5887                 </create>
5888                                 <retrieve />
5889                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5890                     <context link="subscription" field="owning_lib"/>
5891                 </update>
5892                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5893                     <context link="subscription" field="owning_lib"/>
5894                 </delete>
5895                         </actions>
5896                 </permacrud>
5897         </class>
5898
5899         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5900                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5901                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5902                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5903                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5904                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5905                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5906                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5907                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5908                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5909                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5910                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5911                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5912                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5913                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5914                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5915                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5916                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5917                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5918                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5919                 </fields>
5920                 <links>
5921                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5922                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5923                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5924                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5925                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5926                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5927                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5928                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5929                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5930                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5931                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5932                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5933                 </links>
5934                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5935                         <actions>
5936                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5937                                 <retrieve />
5938                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5939                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5940                         </actions>
5941                 </permacrud>
5942         </class>
5943
5944         <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">
5945                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5946                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5947                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5948                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5949                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5950                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5951                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5952                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5953                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5954                 </fields>
5955                 <links>
5956                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5957                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5958                 </links>
5959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5960                         <actions>
5961                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5962                                         <context link="distribution" field="holding_lib" />
5963                                 </create>
5964                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5965                                         <context link="distribution" field="holding_lib" />
5966                                 </retrieve>
5967                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5968                                         <context link="distribution" field="holding_lib" />
5969                                 </update>
5970                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5971                                         <context link="distribution" field="holding_lib" />
5972                                 </delete>
5973                         </actions>
5974                 </permacrud>
5975         </class>
5976
5977         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5978                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5979                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5980                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5981                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5982                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5983                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5984                 </fields>
5985                 <links>
5986                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5987                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5988                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5989                 </links>
5990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5991                         <actions>
5992                                 <create permission="ADMIN_SERIAL_STREAM">
5993                                         <context link="distribution" field="holding_lib" />
5994                                 </create>
5995                                 <retrieve />
5996                                 <update permission="ADMIN_SERIAL_STREAM">
5997                                         <context link="distribution" field="holding_lib" />
5998                                 </update>
5999                                 <delete permission="ADMIN_SERIAL_STREAM">
6000                                         <context link="distribution" field="holding_lib" />
6001                                 </delete>
6002                         </actions>
6003                 </permacrud>
6004         </class>
6005
6006         <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">
6007                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
6008                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6009                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6010                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
6011                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
6012                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
6013                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6014                 </fields>
6015                 <links>
6016                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6017                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
6018                 </links>
6019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6020                         <actions>
6021                                 <create permission="ADMIN_SERIAL_STREAM">
6022                                         <context link="stream" jump="distribution" field="holding_lib" />
6023                                 </create>
6024                                 <retrieve permission="RECEIVE_SERIAL">
6025                                         <context link="stream" jump="distribution" field="holding_lib" />
6026                                 </retrieve>
6027                                 <update permission="ADMIN_SERIAL_STREAM">
6028                                         <context link="stream" jump="distribution" field="holding_lib" />
6029                                 </update>
6030                                 <delete permission="ADMIN_SERIAL_STREAM">
6031                                         <context link="stream" jump="distribution" field="holding_lib" />
6032                                 </delete>
6033                         </actions>
6034                 </permacrud>
6035         </class>
6036
6037         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
6038                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
6039                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6040                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6041                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6042                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6043                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6044                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
6045                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
6046                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6047                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
6048                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
6049                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
6050                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
6051                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
6052                 </fields>
6053                 <links>
6054                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6055                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6056                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
6057                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
6058                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
6059                 </links>
6060                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6061                         <actions>
6062                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
6063                                         <context link="subscription" field="owning_lib" />
6064                                 </create>
6065                                 <retrieve/>
6066                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
6067                                         <context link="subscription" field="owning_lib" />
6068                                 </update>
6069                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
6070                                         <context link="subscription" field="owning_lib" />
6071                                 </delete>
6072                         </actions>
6073                 </permacrud>
6074         </class>
6075
6076         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
6077                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6078                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6079                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6080                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6081                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6082                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6083                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6084                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6085                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6086                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6087                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6088                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6089                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6090                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6091                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6092                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6093                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6094                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6095                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6096                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6097                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6098                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6099                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6100                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6101                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6102                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6103                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6104                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6105                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6106                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6107                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6108                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6109                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6110                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6111                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
6112                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
6113                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
6114                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6115                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6116                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6117                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6118                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6119                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6120                 </fields>
6121                 <links>
6122                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6123                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6124                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6125                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6126                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6127                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6128                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6129                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6130                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6131                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6132                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6133                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6134                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6135                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6136                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6137                 </links>
6138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6139                         <actions>
6140                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6141                                 <retrieve/>
6142                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6143                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
6144                         </actions>
6145                 </permacrud>
6146         </class>
6147
6148         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
6149                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
6150                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6151                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6152                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6153                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6154                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6155                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
6156                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
6157                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
6158                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
6159                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
6160                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
6161                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
6162                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6163                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
6164                 </fields>
6165                 <links>
6166                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6167                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6168                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6169                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
6170                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
6171                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
6172                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
6173                 </links>
6174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6175                         <actions>
6176                                 <create permission="ADMIN_SERIAL_ITEM">
6177                                         <context link="stream" jump="distribution" field="holding_lib" />
6178                                 </create>
6179                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6180                                         <context link="stream" jump="distribution" field="holding_lib" />
6181                                 </retrieve>
6182                                 <update permission="ADMIN_SERIAL_ITEM">
6183                                         <context link="stream" jump="distribution" field="holding_lib" />
6184                                 </update>
6185                                 <delete permission="ADMIN_SERIAL_ITEM">
6186                                         <context link="stream" jump="distribution" field="holding_lib" />
6187                                 </delete>
6188                         </actions>
6189                 </permacrud>
6190         </class>
6191
6192         <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">
6193                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
6194                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6195                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
6196                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6197                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6198                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
6199                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
6200                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6201                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6202                 </fields>
6203                 <links>
6204                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
6205                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6206                 </links>
6207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6208                         <actions>
6209                                 <create permission="ADMIN_SERIAL_ITEM">
6210                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6211                                 </create>
6212                                 <retrieve permission="ADMIN_SERIAL_ITEM">
6213                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6214                                 </retrieve>
6215                                 <update permission="ADMIN_SERIAL_ITEM">
6216                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6217                                 </update>
6218                                 <delete permission="ADMIN_SERIAL_ITEM">
6219                                         <context link="item" jump="stream.distribution" field="holding_lib" />
6220                                 </delete>
6221                         </actions>
6222                 </permacrud>
6223         </class>
6224         <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">
6225                 <fields>
6226                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
6227                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
6228                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
6229                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
6230                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
6231                 </fields>
6232                 <links>
6233                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6234                 </links>
6235         </class>
6236         <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">
6237                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
6238                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6239                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
6240                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
6241                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
6242                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
6243                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
6244                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
6245                 </fields>
6246                 <links>
6247                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
6248                 </links>
6249         </class>
6250         <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">
6251                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
6252                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6253                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6254                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6255                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6256                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6257                 </fields>
6258                 <links>
6259                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6260                 </links>
6261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6262                         <actions>
6263                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6264                                         <context link="distribution" field="holding_lib" />
6265                                 </create>
6266                                 <retrieve/>
6267                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6268                                         <context link="distribution" field="holding_lib" />
6269                                 </update>
6270                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6271                                         <context link="distribution" field="holding_lib" />
6272                                 </delete>
6273                         </actions>
6274                 </permacrud>
6275         </class>
6276
6277         <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">
6278                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
6279                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6280                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6281                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6282                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6283                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6284                 </fields>
6285                 <links>
6286                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6287                 </links>
6288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6289                         <actions>
6290                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6291                                         <context link="distribution" field="holding_lib" />
6292                                 </create>
6293                                 <retrieve/>
6294                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6295                                         <context link="distribution" field="holding_lib" />
6296                                 </update>
6297                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6298                                         <context link="distribution" field="holding_lib" />
6299                                 </delete>
6300                         </actions>
6301                 </permacrud>
6302         </class>
6303
6304         <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">
6305                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
6306                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6307                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
6308                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
6309                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
6310                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
6311                 </fields>
6312                 <links>
6313                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
6314                 </links>
6315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6316                         <actions>
6317                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6318                                         <context link="distribution" field="holding_lib" />
6319                                 </create>
6320                                 <retrieve/>
6321                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6322                                         <context link="distribution" field="holding_lib" />
6323                                 </update>
6324                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6325                                         <context link="distribution" field="holding_lib" />
6326                                 </delete>
6327                         </actions>
6328                 </permacrud>
6329         </class>
6330
6331         <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">
6332                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6333                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6334                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6335                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6336                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6337                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6338                 </fields>
6339                 <links>
6340                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6341                 </links>
6342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6343                         <actions>
6344                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6345                                 <retrieve/>
6346                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6347                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6348                         </actions>
6349                 </permacrud>
6350         </class>
6351
6352         <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">
6353                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6354                         <field name="id" reporter:datatype="id" />
6355                         <field name="owning_copy" reporter:datatype="link"/>
6356                         <field name="stat_cat" reporter:datatype="link"/>
6357                         <field name="stat_cat_entry" reporter:datatype="link"/>
6358                 </fields>
6359                 <links>
6360                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6361                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6362                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6363                 </links>
6364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6365                         <actions>
6366                                 <retrieve/>
6367                         </actions>
6368                 </permacrud>
6369         </class>
6370         <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">
6371                 <fields oils_persist:primary="code">
6372                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6373                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6374                 </fields>
6375                 <links/>
6376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6377             <actions>
6378                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6379                 <retrieve/>
6380                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6381                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6382             </actions>
6383         </permacrud>
6384         </class>
6385         <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">
6386                 <fields oils_persist:primary="code">
6387                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6388                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6389                 </fields>
6390                 <links/>
6391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6392             <actions>
6393                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6394                 <retrieve/>
6395                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6396                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6397             </actions>
6398         </permacrud>
6399         </class>
6400         <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">
6401                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6402                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6403                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6404                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6405                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6406                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6407                 </fields>
6408                 <links>
6409             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6410         </links>
6411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6412             <actions>
6413                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6414                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6415                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6416                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6417             </actions>
6418         </permacrud>
6419         </class>
6420         <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">
6421                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6422                         <field reporter:label="Library Group ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6423                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6424                         <field reporter:label="Global?" name="global" reporter:datatype="bool"/>
6425                         <field reporter:label="Maps" name="maps" oils_persist:virtual="true" reporter:datatype="link"/>
6426                 </fields>
6427                 <links>
6428                         <link field="maps" reltype="has_many" key="lasso" map="" class="lmap"/>
6429         </links>
6430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6431             <actions>
6432                 <create permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6433                 <retrieve/>
6434                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6435                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6436             </actions>
6437         </permacrud>
6438         </class>
6439         <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">
6440                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6441                         <field reporter:label="Library Group Map ID" name="id" reporter:datatype="id" />
6442                         <field reporter:label="Library Group" name="lasso" reporter:datatype="link"/>
6443                         <field reporter:label="Organizational Unit" name="org_unit" reporter:datatype="org_unit"/>
6444                 </fields>
6445                 <links>
6446                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6447                         <link field="org_unit" 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_LIBRARY_GROUPS" global_required="true"/>
6452                 <retrieve/>
6453                 <update permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6454                 <delete permission="ADMIN_LIBRARY_GROUPS" global_required="true"/>
6455             </actions>
6456         </permacrud>
6457         </class>
6458         <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">
6459                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6460                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6461                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6462                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6463                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6464                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6465                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6466                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6467                         <field name="pos" reporter:label="Position" reporter:datatype="int" oils_obj:required="true" />
6468                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6469                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6470                 </fields>
6471                 <links>
6472                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6473                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6474                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6475                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6476                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6477                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6478                 </links>
6479         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6480             <actions>
6481                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6482                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6483                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6484                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6485             </actions>
6486         </permacrud>
6487         </class>
6488         <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">
6489                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6490                         <field name="id" reporter:datatype="id" />
6491                         <field name="from_org" reporter:datatype="org_unit"/>
6492                         <field name="to_org" reporter:datatype="org_unit"/>
6493                         <field name="prox" reporter:datatype="int" />
6494                 </fields>
6495                 <links>
6496                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6497                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6498                 </links>
6499         </class>
6500         <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">
6501                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6502                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6503                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6504                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6505                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6506                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6507                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6508                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6509                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6510                 </fields>
6511                 <links/>
6512         </class>
6513         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6514                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6515                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6516                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6517                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6518                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6519                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6520                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6521                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6522                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6523                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6524                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6525                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6526                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6527                 </fields>
6528                 <links>
6529                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6530                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6531                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6532                 </links>
6533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6534             <actions>
6535                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6536                 <retrieve/>
6537                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6538                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6539             </actions>
6540         </permacrud>
6541         </class>
6542         <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">
6543                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6544                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6545                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6546                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6547                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6548                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6549                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6550                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6551                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6552                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6553                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6554                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6555                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6556                         <field name="latitude" reporter:label="Latitude" reporter:datatype="float"/>
6557                         <field name="longitude" reporter:label="Longitude" reporter:datatype="float"/>
6558                 </fields>
6559                 <links>
6560                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6561                 </links>
6562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6563             <actions>
6564                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6565                 <retrieve/>
6566                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6567                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6568             </actions>
6569         </permacrud>
6570         </class>
6571         <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">
6572                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6573                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6574                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6575                         <field name="query_text" reporter:datatype="text"/>
6576                 </fields>
6577         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6578             <actions>
6579                 <retrieve/>
6580             </actions>
6581         </permacrud>
6582         </class>
6583
6584         <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">
6585                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6586                         <field name="id" reporter:datatype="id" reporter:selector="label" reporter:label="ID" oils_obj:required="true"/>
6587                         <field name="owner" reporter:datatype="org_unit" reporter:label="Owning Org Unit" oils_obj:required="true"/>
6588                         <field name="code" reporter:datatype="text" reporter:label="Code" oils_obj:required="true"/>
6589                         <field name="label" reporter:datatype="text" oils_persist:i18n="true" reporter:label="Label" oils_obj:required="true"/>
6590                         <field name="create_date" reporter:datatype="timestamp" reporter:label="Create Date"/>
6591                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link" reporter:label="Group Entries"/>
6592                 </fields>
6593                 <links>
6594                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6595                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6596                 </links>
6597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6598             <actions>
6599                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6600                 <retrieve/>
6601                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6602                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6603             </actions>
6604         </permacrud>
6605         </class>
6606         <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">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6608                         <field name="id" reporter:datatype="id" reporter:label="ID" oils_obj:required="true"/>
6609                         <field name="grp" reporter:datatype="link" reporter:label="Search Filter Group" oils_obj:required="true"/>
6610                         <field name="pos" reporter:datatype="int" reporter:label="Position" oils_obj:required="true"/>
6611                         <field name="query" reporter:datatype="link" reporter:label="Query" oils_obj:required="true"/>
6612                 </fields>
6613                 <links>
6614                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6615                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6616                 </links>
6617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6618             <actions>
6619                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6620                     <context link="grp" field="owner"/>
6621                 </create>
6622                 <retrieve/>
6623                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6624                     <context link="grp" field="owner"/>
6625                 </update>
6626                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6627                     <context link="grp" field="owner"/>
6628                 </delete>
6629             </actions>
6630         </permacrud>
6631         </class>
6632
6633         <!-- A note: Please update alhr and ahopl when updating ahr -->
6634         <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">
6635                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6636                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6637                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6638                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6639                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6640                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6641                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6642                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6643                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6644                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6645                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6646                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6647                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6648                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6649                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6650                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6651                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6652                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6653                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6654                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6655                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6656                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6657                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6658                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6659                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6660                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6661                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6662                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6663                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6664                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6665                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6666                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6667                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6668                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6669                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6670                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6671                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6672                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6673                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6674                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6675                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6676                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6677                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6678                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6679                 </fields>
6680                 <links>
6681                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6682                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6683                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6684                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6685                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6686                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6687                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6688                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6689                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6690                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6691                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6692                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6693                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6694                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6695                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6696                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6697                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6698                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6699                 </links>
6700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6701                         <actions>
6702                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6703                         </actions>
6704                 </permacrud>
6705         </class>
6706         <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">
6707                 <oils_persist:source_definition><![CDATA[
6708                 SELECT
6709                         ahr.*,
6710                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6711                                 copy_location_order_position,
6712                         CASE WHEN au.alias IS NOT NULL THEN
6713                                 au.alias
6714                         ELSE
6715                                 au.first_given_name
6716                         END AS usr_alias_or_first_given_name,
6717                         au.first_given_name AS usr_first_given_name,
6718                         au.second_given_name AS usr_second_given_name,
6719                         au.family_name AS usr_family_name,
6720                         au.prefix AS usr_prefix,
6721                         au.suffix AS usr_suffix,
6722                         au.alias AS usr_alias,
6723                         CASE WHEN au.alias IS NOT NULL THEN
6724                                 au.alias
6725                         ELSE
6726                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6727                                         COALESCE(au.family_name, ''),
6728                                         COALESCE(au.suffix, ''),
6729                                         ', ',
6730                                         COALESCE(au.prefix, ''),
6731                                         COALESCE(au.first_given_name, ''),
6732                                         COALESCE(au.second_given_name, '')
6733                                 ], ' '), E'\\s+,', ',')
6734                         END AS usr_alias_or_display_name,
6735                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6736                                 COALESCE(au.family_name, ''),
6737                                 COALESCE(au.suffix, ''),
6738                                 ', ',
6739                                 COALESCE(au.prefix, ''),
6740                                 COALESCE(au.first_given_name, ''),
6741                                 COALESCE(au.second_given_name, '')
6742                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6743                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6744                                 AS call_number_label,
6745                         siss.label AS issuance_label,
6746                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6747                         ahcm_1.copy_count AS potential_copies
6748                 FROM action.hold_request ahr
6749                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6750                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6751                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6752                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6753                 JOIN actor.usr au ON (au.id = ahr.usr)
6754                 JOIN (
6755                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6756                         FROM asset.copy_location
6757                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6758                 LEFT JOIN actor.usr_standing_penalty ausp 
6759                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6760                 LEFT JOIN config.standing_penalty csp
6761                         ON (
6762                                 csp.id = ausp.standing_penalty AND 
6763                                 csp.block_list LIKE '%CAPTURE%' AND (
6764                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6765                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6766                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6767                                         )
6768                                 )
6769                         )
6770                 JOIN (
6771                         SELECT COUNT(target_copy) AS copy_count, hold
6772                         FROM action.hold_copy_map
6773                         GROUP BY 2
6774                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6775                 LEFT JOIN serial.issuance siss
6776                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6777                 LEFT JOIN asset.copy_location_order acplo
6778                         ON (acp.location = acplo.location AND
6779                                 acp.circ_lib = acplo.org)
6780                 WHERE
6781                         ahr.capture_time IS NULL AND
6782                         ahr.cancel_time IS NULL AND
6783                         csp.id IS NULL AND
6784                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6785                         acp.status IN (0,7)
6786                 ]]></oils_persist:source_definition>
6787                 <fields oils_persist:primary="id">
6788                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6789                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6790                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6791                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6792                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6793                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6794                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6795                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6796                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6797                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6798                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6799                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6800                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6801                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6802                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6803                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6804                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6805                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6806                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6807                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6808                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6809                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6810                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6811                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6812                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6813                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6814                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6815                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6816                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6817                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6818                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6819                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6820                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6821                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6822                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6823                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6824                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6825                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6826                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6827                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6828                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6829                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6830                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6831                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6832                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6833                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6834                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6835                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6836                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6837                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6838                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6839                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6840                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6841                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6842                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6843                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6844                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6845                 </fields>
6846                 <links>
6847                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6848                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6849                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6850                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6851                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6852                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6853                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6854                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6855                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6856                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6857                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6858                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6859                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6860                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6861                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6862                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6863                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6864                 </links>
6865                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6866                         <actions>
6867                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6868                         </actions>
6869                 </permacrud>
6870         </class>
6871         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6872                 <oils_persist:source_definition><![CDATA[
6873                         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)
6874                 ]]></oils_persist:source_definition>
6875                 <fields oils_persist:primary="id">
6876                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6877                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6878                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6879                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6880                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6881                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6882                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6883                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6884                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6885                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6886                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6887                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6888                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6889                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6890                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6891                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6892                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6893                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6894                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6895                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6896                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6897                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6898                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6899                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6900                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6901                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6902                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6903                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6904                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6905                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6906                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6907                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6908                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6909                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6910                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6911                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6912                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6913                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6914                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6915                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6916                         <field reporter:label="Hopeless Date" name="hopeless_date" reporter:datatype="timestamp"/>
6917                 </fields>
6918                 <links>
6919                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6920                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6921                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6922                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6923                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6924                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6925                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6926                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6927                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6928                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6929                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6930                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6931                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6932                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6933                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6934                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6935                 </links>
6936         </class>
6937
6938         <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">
6939                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6940                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6941                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6942                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6943                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6944                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6945                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6946                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6947                 </fields>
6948                 <links>
6949                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6950                 </links>
6951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6952                         <actions>
6953                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6954                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6955                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6956                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6957                         </actions>
6958                 </permacrud>
6959         </class>
6960         <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">
6961                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6962                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6963                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6964                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6965                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6966                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6967                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6968                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6969                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6970                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6971                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6972                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6973                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6974                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6975                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6976                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6977                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6978                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6979                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6980                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6981                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6982                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6983                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6984                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6985                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6986                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6987                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6988                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6989                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6990                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6991                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6992                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6993                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6994                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6995                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6996                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6997                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6998                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6999                 </fields>
7000                 <links>
7001                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7002                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7003                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7004                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7005                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7006                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7007                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7008                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7009                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7010                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7011                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7012                 </links>
7013                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7014                         <actions>
7015                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7016                         </actions>
7017                 </permacrud>
7018         </class>
7019         <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">
7020                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
7021                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
7022                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
7023                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
7024                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
7025                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
7026                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
7027                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
7028                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
7029                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
7030                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
7031                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7032                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
7033                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
7034                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
7035                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
7036                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
7037                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
7038                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
7039                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
7040                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
7041                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
7042                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
7043                         <field reporter:label="Item Selection Depth" name="selection_depth" />
7044                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
7045                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
7046                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7047                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
7048                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
7049                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
7050                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
7051                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
7052                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
7053                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
7054                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
7055                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
7056                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
7057                 </fields>
7058                 <links>
7059                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
7060                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
7061                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7062                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
7063                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7064                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
7065                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
7066                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
7067                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
7068                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
7069                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
7070                 </links>
7071                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7072                         <actions>
7073                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
7074                         </actions>
7075                 </permacrud>
7076         </class>
7077
7078         <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">
7079                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
7080                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
7081                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
7082                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
7083                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
7084                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
7085                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
7086                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
7087                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
7088                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
7089                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
7090                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7091                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
7092                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7093                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
7094                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
7095                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
7096                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7097                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
7098                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
7099                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
7100                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
7101                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7102                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
7103                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
7104                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
7105                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
7106                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
7107                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
7108                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
7109                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
7110                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
7111                 </fields>
7112                 <links>
7113                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
7114                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
7115                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
7116                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
7117                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
7118                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
7119                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7120                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
7121                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
7122                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
7123                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
7124                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
7125                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
7126                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
7127                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
7128                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
7129                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
7130                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
7131                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
7132                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
7133                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
7134                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
7135                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
7136                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
7137                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
7138                 </links>
7139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7140             <actions>
7141                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
7142                 <retrieve />
7143                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
7144                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
7145             </actions>
7146         </permacrud>
7147         </class>
7148         <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">
7149                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
7150                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7151                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
7152                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
7153                 </fields>
7154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7155                         <actions>
7156                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7157                                 <retrieve/>
7158                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7159                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7160                         </actions>
7161                 </permacrud>
7162         </class>
7163         <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">
7164                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
7165                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7166                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
7167                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
7168                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
7169                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
7170                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
7171                 </fields>
7172                 <links>
7173                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
7174                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7175                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
7176                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
7177                 </links>
7178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7179                         <actions>
7180                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7181                                 <retrieve/>
7182                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7183                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
7184                         </actions>
7185                 </permacrud>
7186         </class>
7187         <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">
7188                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
7189                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7190                         <field name="btype" reporter:datatype="text"/>
7191                         <field name="id" reporter:datatype="id" />
7192                         <field name="name"  reporter:datatype="text"/>
7193                         <field name="description" reporter:datatype="text"/>
7194                         <field name="owner" reporter:datatype="link"/>
7195                         <field name="pub" reporter:datatype="bool"/>
7196                         <field name="create_time" reporter:datatype="timestamp" />
7197                         <field name="owning_lib" reporter:datatype="org_unit" />
7198                 </fields>
7199                 <links>
7200                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7201                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7202                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
7203                 </links>
7204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7205                         <actions>
7206                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7207                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7208                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7209                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
7210                         </actions>
7211                 </permacrud>
7212         </class>
7213         <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">
7214                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
7215                         <field name="id" reporter:datatype="id" />
7216                         <field name="bucket" reporter:datatype="link"/>
7217                         <field name="note" reporter:datatype="text" />
7218                 </fields>
7219                 <links>
7220                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
7221                 </links>
7222         </class>
7223         <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">
7224                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
7225                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7226                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7227                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7228                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7229                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7230                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7231                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7232                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7233                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7234                 </fields>
7235                 <links>
7236                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7237                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
7238                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
7239                 </links>
7240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7241                         <actions>
7242                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7243                         </actions>
7244                 </permacrud>
7245         </class>
7246         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
7247                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
7248                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
7249                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7250                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
7251                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7252                 </fields>
7253                 <links>
7254                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7255                 </links>
7256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7257                         <actions>
7258                                 <retrieve permission="VIEW_USER user_request.view">
7259                                         <context link="usr" field="home_ou" />
7260                                 </retrieve>
7261                         </actions>
7262                 </permacrud>
7263         </class>
7264     <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">
7265         <fields oils_persist:primary="field">
7266             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7267             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7268             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7269         </fields>
7270         <links/>
7271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7272             <actions>
7273                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
7274                 <retrieve />
7275                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
7276                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
7277             </actions>
7278         </permacrud>
7279     </class>
7280         <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">
7281                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
7282                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7283                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7284                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7285                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7286                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
7287                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
7288                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
7289                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
7290                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
7291                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
7292                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
7293                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
7294                 </fields>
7295                 <links>
7296                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7297                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
7298                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
7299                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
7300                 </links>
7301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7302             <actions>
7303                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
7304                 <retrieve />
7305                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
7306                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
7307             </actions>
7308         </permacrud>
7309         </class>
7310         <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">
7311                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
7312                         <field name="field" reporter:datatype="link"/>
7313                         <field name="id" reporter:datatype="id" />
7314                         <field name="source" reporter:datatype="link"/>
7315                         <field name="value"  reporter:datatype="text"/>
7316                 </fields>
7317                 <links>
7318                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7319                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7320                 </links>
7321         </class>
7322         <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">
7323                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
7324                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
7325                         <field name="btype" reporter:datatype="text"/>
7326                         <field name="id" reporter:datatype="id" />
7327                         <field name="name"  reporter:datatype="text"/>
7328                         <field name="description" reporter:datatype="text"/>
7329                         <field name="owner" reporter:datatype="link"/>
7330                         <field name="pub" reporter:datatype="bool"/>
7331                         <field name="create_time" reporter:datatype="timestamp" />
7332                         <field name="owning_lib" reporter:datatype="org_unit" />
7333                 </fields>
7334                 <links>
7335                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7336                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7337                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7338                 </links>
7339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7340                         <actions>
7341                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7342                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7343                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7344                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7345                         </actions>
7346                 </permacrud>
7347         </class>
7348         <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">
7349                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7350                         <field name="id" reporter:datatype="id" />
7351                         <field name="bucket" reporter:datatype="link"/>
7352                         <field name="note" reporter:datatype="text" />
7353                 </fields>
7354                 <links>
7355                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7356                 </links>
7357         </class>
7358         <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">
7359                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7360                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7361                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7362                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7363                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7364                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7365                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7366                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7367                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7368                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7369                 </fields>
7370                 <links>
7371                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7372                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7373                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7374                 </links>
7375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7376             <actions>
7377                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7378                     <context link="xact" jump="usr" field="home_ou"/>
7379                 </retrieve>
7380                         </actions>
7381                 </permacrud>
7382         </class>
7383         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7384                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7385                         <field name="id" reporter:datatype="id" />
7386                         <field name="ind1" />
7387                         <field name="ind2" />
7388                         <field name="record" />
7389                         <field name="subfield" />
7390                         <field name="tag" />
7391                         <field name="value" />
7392                 </fields>
7393                 <links>
7394                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7395                 </links>
7396         </class>
7397         <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">
7398                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7399                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7400                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7401                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7402                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7403                 </fields>
7404                 <links>
7405                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7406                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7407                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7408                 </links>
7409         </class>
7410         <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">
7411                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7412                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7413                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7414                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7415                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7416                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7417                 </fields>
7418                 <links>
7419                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7420                 </links>
7421         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7422             <actions>
7423                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7424                 <retrieve/>
7425                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7426                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7427             </actions>
7428         </permacrud>
7429
7430         </class>
7431         <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">
7432                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7433                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7434                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7435                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7436                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7437                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7438                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7439                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7440                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7441                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7442                 </fields>
7443                 <links>
7444                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7445                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7446                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7447                 </links>
7448         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7449             <actions>
7450                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7451                 <retrieve/>
7452                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7453                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7454             </actions>
7455         </permacrud>
7456         </class>
7457         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7458                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7459                         <field name="create_date" reporter:datatype="timestamp"/>
7460                         <field name="creator" reporter:datatype="link"/>
7461                         <field name="edit_date" reporter:datatype="timestamp"/>
7462                         <field name="editor" reporter:datatype="link"/>
7463                         <field name="id" reporter:datatype="id" />
7464                         <field name="pub" reporter:datatype="bool"/>
7465                         <field name="record" reporter:datatype="link"/>
7466                         <field name="value"  reporter:datatype="text"/>
7467                 </fields>
7468                 <links>
7469                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7470                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7471                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7472                 </links>
7473         </class>
7474         <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">
7475                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7476                         <field name="balance_owed" reporter:datatype="money" />
7477                         <field name="total_owed" reporter:datatype="money" />
7478                         <field name="total_paid" reporter:datatype="money" />
7479                         <field name="usr" reporter:datatype="link"/>
7480                 </fields>
7481                 <links>
7482                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7483                 </links>
7484         </class>
7485     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7486                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7487                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7488                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7489                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7490                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7491                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7492                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7493                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7494                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7495                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7496                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7497                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7498                 </fields>
7499                 <links>
7500                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7501                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7502                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7503                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7504                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7505                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7506                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7507                 </links>
7508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7509             <actions>
7510                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7511             </actions>
7512         </permacrud>
7513         </class>
7514         <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">
7515                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7516                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7517                         <field name="quality" reporter:datatype="int" />
7518                         <field name="source" reporter:datatype="text"/>
7519                         <field name="transcendant" reporter:datatype="bool"/>
7520                         <field name="can_have_copies" reporter:datatype="bool"/>
7521                 </fields>
7522                 <links/>
7523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7524             <actions>
7525                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7526                 <retrieve/>
7527                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7528                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7529             </actions>
7530         </permacrud>
7531         </class>
7532         <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">
7533                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7534                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7535                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7536                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7537                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7538                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7539                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7540                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7541                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7542                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7543                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7544                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7545                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7546                 </fields>
7547                 <links>
7548                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7549                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7550                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7551                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7552                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7553                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7554                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7555                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7556                 </links>
7557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7558                         <actions>
7559                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7560                                         <context link="usr" field="home_ou" />
7561                                 </retrieve>
7562                         </actions>
7563                 </permacrud>
7564         </class>
7565         <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">
7566                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7567                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7568                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7569                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7570                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7571                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7572                 </fields>
7573                 <links>
7574                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7575                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7576                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7577                 </links>
7578         </class>
7579         <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">
7580                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7581                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7582                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7583                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7584                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7585                 </fields>
7586                 <links>
7587                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7588                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7589                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7590                 </links>
7591         </class>
7592         <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">
7593                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7594                         <field name="bucket" reporter:datatype="link"/>
7595                         <field name="id" reporter:datatype="id" />
7596                         <field name="target_user" reporter:datatype="link"/>
7597                         <field name="create_time" reporter:datatype="timestamp" />
7598                         <field name="pos" reporter:datatype="int" />
7599                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7600                 </fields>
7601                 <links>
7602                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7603                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7604             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7605                 </links>
7606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7607                         <actions>
7608                                 <retrieve permission="ADMIN_USER_BUCKET">
7609                     <context link="bucket" owning_lib="owning_lib"/>
7610                 </retrieve>
7611             </actions>
7612         </permacrud>
7613         </class>
7614         <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">
7615                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_id_seq">
7616                         <field name="id" reporter:datatype="id" />
7617                         <field name="staff" reporter:datatype="link"/>
7618                         <field name="bucket" reporter:datatype="link"/>
7619                         <field name="target" reporter:datatype="int" />
7620                         <field name="hold_type" reporter:datatype="text" />
7621                         <field name="run_date" reporter:datatype="timestamp" />
7622                         <field name="cancelled" reporter:datatype="timestamp" />
7623                         <field name="mappings" oils_persist:virtual="true" reporter:datatype="link" />
7624                 </fields>
7625                 <links>
7626                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7627                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7628                         <link field="mappings" reltype="has_many" key="batch_hold_event" map="" class="abhem"/>
7629                 </links>
7630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7631                         <actions>
7632                 <create permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7633                 <retrieve/>
7634                 <update permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7635                 <delete permission="MANAGE_HOLD_GROUPS" global_required="true"/>
7636             </actions>
7637         </permacrud>
7638         </class>
7639         <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">
7640                 <fields oils_persist:primary="id" oils_persist:sequence="action.batch_hold_event_map_id_seq">
7641                         <field name="id" reporter:datatype="id" />
7642                         <field name="batch_hold_event" reporter:datatype="link"/>
7643                         <field name="hold" reporter:datatype="link"/>
7644                 </fields>
7645                 <links>
7646                         <link field="batch_hold_event" reltype="has_a" key="id" map="" class="abhe"/>
7647                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7648                 </links>
7649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7650                         <actions>
7651                 <retrieve/>
7652             </actions>
7653         </permacrud>
7654         </class>
7655         <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">
7656                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7657                         <field name="id" reporter:datatype="id" />
7658                         <field name="item" reporter:datatype="link"/>
7659                         <field name="note" reporter:datatype="text" />
7660                 </fields>
7661                 <links>
7662                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7663                 </links>
7664         </class>
7665         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7666                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7667                         <field name="balance_owed" reporter:datatype="money" />
7668                         <field name="total_owed" reporter:datatype="money" />
7669                         <field name="total_paid" reporter:datatype="money" />
7670                         <field name="usr" reporter:datatype="link"/>
7671                 </fields>
7672                 <links>
7673                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7674                 </links>
7675         </class>
7676         <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">
7677                 <fields oils_persist:primary="code" oils_persist:sequence="">
7678                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7679                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7680                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7681                 </fields>
7682                 <links/>
7683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7684             <actions>
7685                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7686                 <retrieve/>
7687                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7688                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7689             </actions>
7690         </permacrud>
7691         </class>
7692         <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">
7693                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7694                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7695                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7696                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7697                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7698                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7699                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7700                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7701                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7702                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7703                 </fields>
7704                 <links>
7705                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7706                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7707                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7708                 </links>
7709         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7710             <actions>
7711                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7712                     <context link="xact" jump="usr" field="home_ou"/>
7713                 </retrieve>
7714                         </actions>
7715                 </permacrud>
7716         </class>
7717         <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">
7718                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7719                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7720                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7721                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7722                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7723                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7724                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7725                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7726                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7727                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7728                 </fields>
7729                 <links>
7730                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7731                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7732                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7733                 </links>
7734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7735             <actions>
7736                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7737                     <context link="xact" jump="usr" field="home_ou"/>
7738                 </retrieve>
7739                         </actions>
7740                 </permacrud>
7741         </class>
7742         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7743                 <fields oils_persist:primary="id" oils_persist:sequence="">
7744                         <field name="checkin_lib" reporter:datatype="link"/>
7745                         <field name="checkin_staff" reporter:datatype="link"/>
7746                         <field name="checkin_time" reporter:datatype="timestamp"/>
7747                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7748                         <field name="circ_staff" reporter:datatype="link"/>
7749                         <field name="desk_renewal" reporter:datatype="bool"/>
7750                         <field name="due_date" reporter:datatype="timestamp"/>
7751                         <field name="duration" reporter:datatype="interval"/>
7752                         <field name="duration_rule" reporter:datatype="link"/>
7753                         <field name="fine_interval" reporter:datatype="interval"/>
7754                         <field name="id" reporter:datatype="id" />
7755                         <field name="max_fine" reporter:datatype="money" />
7756                         <field name="max_fine_rule" reporter:datatype="link"/>
7757                         <field name="opac_renewal" reporter:datatype="bool"/>
7758                         <field name="phone_renewal" reporter:datatype="bool"/>
7759                         <field name="recurring_fine" reporter:datatype="money" />
7760                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7761                         <field name="renewal_remaining" reporter:datatype="int" />
7762             <field name="grace_period" reporter:datatype="interval" />
7763                         <field name="stop_fines" reporter:datatype="text"/>
7764                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7765                         <field name="target_copy" reporter:datatype="link"/>
7766                         <field name="usr" reporter:datatype="link"/>
7767                         <field name="xact_finish" reporter:datatype="timestamp" />
7768                         <field name="xact_start" reporter:datatype="timestamp" />
7769                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7770                         <field name="auto_renewal" reporter:datatype="bool"/>
7771                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7772                 </fields>
7773                 <links>
7774                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7775                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7776                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7777                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7778                 </links>
7779         </class>
7780         <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">
7781                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7782                         <field name="field" reporter:datatype="link"/>
7783                         <field name="id" reporter:datatype="id" />
7784                         <field name="source" reporter:datatype="link"/>
7785                         <field name="value" reporter:datatype="text"/>
7786                 </fields>
7787                 <links>
7788                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7789                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7790                 </links>
7791         </class>
7792         <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">
7793                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7794                         <field name="high" reporter:datatype="money" />
7795                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7796                         <field name="low" reporter:datatype="money" />
7797                         <field name="name" reporter:datatype="text"/>
7798                         <field name="normal" reporter:datatype="money" />
7799                         <field name="recurrence_interval" reporter:datatype="interval"/>
7800             <field name="grace_period" reporter:datatype="interval" />
7801                 </fields>
7802                 <links/>
7803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7804             <actions>
7805                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7806                 <retrieve/>
7807                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7808                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7809             </actions>
7810         </permacrud>
7811         </class>
7812         <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">
7813                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7814                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7815                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7816                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7817                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7818                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7819                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7820                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7821                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7822                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7823                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7824                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7825                 </fields>
7826                 <links>
7827                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7828                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7829                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7830                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7831                 </links>
7832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7833             <actions>
7834                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7835                     <context link="xact" jump="usr" field="home_ou"/>
7836                 </retrieve>
7837                         </actions>
7838                 </permacrud>
7839         </class>
7840         <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">
7841                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7842                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7843                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7844                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7845                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7846                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7847                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7848                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7849                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7850                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7851                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7852                 </fields>
7853                 <links>
7854                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7855                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7856                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7857                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7858                 </links>
7859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7860             <actions>
7861                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7862                     <context link="xact" jump="usr" field="home_ou"/>
7863                 </retrieve>
7864                         </actions>
7865                 </permacrud>
7866         </class>
7867         <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">
7868                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7869                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7870                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7871                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7872                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7873                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7874                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7875                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7876                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7877                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7878                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7879                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7880                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7881                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7882                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7883                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7884                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7885                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7886                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7887                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7888                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7889                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7890                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7891                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
7892                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7893                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7894                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7895                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7896                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7897                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7898                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7899                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7900                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7901                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7902                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7903                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7904                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7905                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7906                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7907                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7908                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7909                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7910                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7911                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7912                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7913                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7914                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7915                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7916                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7917                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7918                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7919                 </fields>
7920                 <links>
7921                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7922                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7923                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7924                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7925                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7926                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7927                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7928                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7929                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7930                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7931                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7932                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7933                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7934                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7935                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7936                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7937                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7938                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7939                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7940                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7941                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7942                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7943                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7944                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7945                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7946                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7947                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7948                 </links>
7949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7950             <actions>
7951                 <create permission="CREATE_COPY">
7952                     <context link="call_number" field="owning_lib"/>
7953                 </create>
7954                 <retrieve/>
7955                 <update permission="UPDATE_COPY">
7956                     <context link="call_number" field="owning_lib"/>
7957                 </update>
7958                 <delete permission="DELETE_COPY">
7959                     <context link="call_number" field="owning_lib"/>
7960                 </delete>
7961             </actions>
7962         </permacrud>
7963         </class>
7964
7965         <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">
7966                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7967             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7968                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7969                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7970                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7971                 </fields>
7972                 <links>
7973                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7974                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7975                 </links>
7976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7977             <actions>
7978                                 <create/>
7979                                 <retrieve/>
7980                                 <update/>
7981                                 <delete/>
7982             </actions>
7983         </permacrud>
7984         </class>
7985
7986         <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">
7987                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7988                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7989                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7990                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7991                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7992                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7993                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7994                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7995                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7996                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7997                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7998                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7999                 </fields>
8000                 <links>
8001                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
8002                 </links>
8003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8004             <actions>
8005                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8006                 <retrieve/>
8007                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
8008                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
8009             </actions>
8010         </permacrud>
8011         </class>
8012
8013         <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">
8014                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
8015                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8016                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
8017                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8018                 </fields>
8019                 <links>
8020                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8021                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8022                 </links>
8023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8024             <actions>
8025                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8026                 <retrieve/>
8027                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
8028                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
8029             </actions>
8030         </permacrud>
8031         </class>
8032
8033         <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">
8034                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
8035                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8036                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8037                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8038                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8039                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8040                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8041                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8042                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8043                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8044                 </fields>
8045                 <links>
8046                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8047                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8048                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8049                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8050                 </links>
8051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8052             <actions>
8053                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8054                     <context link="copy" field="circ_lib"/>
8055                 </create>
8056                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8057                     <context link="copy" field="circ_lib"/>
8058                                 </retrieve>
8059                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8060                     <context link="copy" field="circ_lib"/>
8061                                 </update>
8062                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8063                     <context link="copy" field="circ_lib"/>
8064                                 </delete>
8065             </actions>
8066         </permacrud>
8067         </class>
8068
8069         <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">
8070                 <fields oils_persist:primary="id">
8071                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
8072                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
8073                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
8074                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
8075                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
8076                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
8077                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8078                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
8079                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
8080                 </fields>
8081                 <links>
8082                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
8083                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8084                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
8085                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
8086                 </links>
8087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8088             <actions>
8089                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
8090                     <context link="copy" field="circ_lib"/>
8091                 </create>
8092                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
8093                     <context link="copy" field="circ_lib"/>
8094                                 </retrieve>
8095                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
8096                     <context link="copy" field="circ_lib"/>
8097                                 </update>
8098                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
8099                     <context link="copy" field="circ_lib"/>
8100                                 </delete>
8101             </actions>
8102         </permacrud>
8103         </class>
8104
8105         <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">
8106                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
8107                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
8108                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
8109                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8110                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8111                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8112                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8113                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8114                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
8115                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
8116                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8117                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
8118                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
8119                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
8120                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
8121                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
8122                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
8123                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
8124                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
8125                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
8126                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
8127                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
8128                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
8129                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
8130                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
8131                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
8132                 </fields>
8133                 <links>
8134                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8135                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8136                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8137                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8138                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8139                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8140                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8141                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
8142                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8143                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
8144                 </links>
8145                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8146                         <actions>
8147                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8148                                 <retrieve />
8149                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8150                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
8151                         </actions>
8152                 </permacrud>
8153         </class>
8154
8155         <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">
8156                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
8157                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
8158                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8159                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8160                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
8161                 </fields>
8162                 <links/>
8163         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8164             <actions>
8165                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8166                 <retrieve/>
8167                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8168                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
8169             </actions>
8170         </permacrud>
8171         </class>
8172         <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">
8173                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
8174                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
8175                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8176                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
8177                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
8178                 </fields>
8179                 <links/>
8180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8181             <actions>
8182                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8183                 <retrieve/>
8184                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8185                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
8186             </actions>
8187         </permacrud>
8188         </class>
8189         <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">
8190                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
8191                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8192                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8193                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8194                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8195                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8196                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
8197                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
8198                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
8199                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
8200                 </fields>
8201                 <links>
8202                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
8203                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
8204                 </links>
8205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8206             <actions>
8207                 <create permission="CREATE_PERM" global_required="true"/>
8208                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8209                 <update permission="UPDATE_PERM" global_required="true"/>
8210                 <delete permission="DELETE_PERM" global_required="true"/>
8211             </actions>
8212         </permacrud>
8213         </class>
8214         <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">
8215                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
8216                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
8217                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
8218                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
8219                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
8220                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8221                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8222                 </fields>
8223                 <links>
8224                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
8225                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8226                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8227                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
8228                 </links>
8229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8230                         <actions>
8231                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8232                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8233                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8234                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
8235                         </actions>
8236                 </permacrud>
8237         </class>
8238         <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">
8239                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
8240                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
8241                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
8242                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
8243                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
8244                 </fields>
8245                 <links>
8246                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
8247                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
8248                 </links>
8249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8250             <actions>
8251                 <create permission="ADMIN_SURVEY">
8252                     <context link="question" jump="survey" field="owner"/>
8253                 </create>
8254                 <retrieve/>
8255                 <update permission="ADMIN_SURVEY">
8256                     <context link="question" jump="survey" field="owner"/>
8257                 </update>
8258                 <delete permission="ADMIN_SURVEY">
8259                     <context link="question" jump="survey" field="owner"/>
8260                 </delete>
8261             </actions>
8262         </permacrud>
8263         </class>
8264         <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">
8265                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
8266                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8267                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
8268                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
8269                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
8270                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
8271                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
8272                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
8273                 </fields>
8274                 <links>
8275                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
8276                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
8277                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
8278                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8279                 </links>
8280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8281                         <actions>
8282                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
8283                         </actions>
8284                 </permacrud>
8285         </class>
8286         <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">
8287                 <fields oils_persist:primary="usr" oils_persist:sequence="">
8288                         <field name="balance_owed" reporter:datatype="money" />
8289                         <field name="total_owed" reporter:datatype="money" />
8290                         <field name="total_paid" reporter:datatype="money" />
8291                         <field name="usr" reporter:datatype="link"/>
8292                 </fields>
8293                 <links>
8294                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8295                 </links>
8296         </class>
8297         <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">
8298                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
8299                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
8300                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
8301                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
8302                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
8303                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8304                 </fields>
8305                 <links>
8306                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8307                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
8308                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8309                 </links>
8310         </class>
8311         <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">
8312                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
8313                         <field name="field" reporter:datatype="link"/>
8314                         <field name="id" reporter:datatype="id" />
8315                         <field name="source" reporter:datatype="link"/>
8316                         <field name="value" reporter:datatype="text"/>
8317                 </fields>
8318                 <links>
8319                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8320                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8321                 </links>
8322         </class>
8323         <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">
8324                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
8325                         <field name="field" reporter:datatype="link"/>
8326                         <field name="id" reporter:datatype="id" />
8327                         <field name="source" reporter:datatype="link"/>
8328                         <field name="value" reporter:datatype="text"/>
8329                 </fields>
8330                 <links>
8331                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
8332                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
8333                 </links>
8334         </class>
8335         <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">
8336                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
8337                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
8338                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
8339                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
8340                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
8341                 </fields>
8342                 <links>
8343                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
8344                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
8345                 </links>
8346         </class>
8347         <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">
8348                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
8349                         <field name="depth" reporter:datatype="int" />
8350                         <field name="grantable" reporter:datatype="bool"/>
8351                         <field name="grp" reporter:datatype="link"/>
8352                         <field name="id" reporter:datatype="id" />
8353                         <field name="perm" reporter:datatype="link"/>
8354                 </fields>
8355                 <links>
8356                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8357                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8358                 </links>
8359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8360             <actions>
8361                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
8362                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
8363                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
8364                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
8365             </actions>
8366         </permacrud>
8367         </class>
8368         <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">
8369                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
8370                         <field name="items" oils_persist:virtual="true" />
8371                         <field name="btype" reporter:datatype="text"/>
8372                         <field name="id" reporter:datatype="id" />
8373                         <field name="name" reporter:datatype="text"/>
8374                         <field name="description" reporter:datatype="text"/>
8375                         <field name="owner" reporter:datatype="link"/>
8376                         <field name="pub" reporter:datatype="bool"/>
8377                         <field name="create_time" reporter:datatype="timestamp" />
8378                         <field name="owning_lib" reporter:datatype="org_unit" />
8379                 </fields>
8380                 <links>
8381                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8382                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8383                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8384                 </links>
8385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8386                         <actions>
8387                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8388                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8389                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8390                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8391                         </actions>
8392                 </permacrud>
8393         </class>
8394         <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">
8395                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8396                         <field name="id" reporter:datatype="id" />
8397                         <field name="bucket" reporter:datatype="link"/>
8398                         <field name="note" reporter:datatype="text" />
8399                 </fields>
8400                 <links>
8401                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8402                 </links>
8403         </class>
8404         <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">
8405                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8406                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8407                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8408                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8409                 </fields>
8410                 <links>
8411                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8412                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8413                 </links>
8414         </class>
8415         <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">
8416                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8417                         <field name="depth" reporter:datatype="int"/>
8418                         <field name="grantable" reporter:datatype="bool"/>
8419                         <field name="id" reporter:datatype="id" />
8420                         <field name="perm" reporter:datatype="link"/>
8421                         <field name="usr" reporter:datatype="link"/>
8422                 </fields>
8423                 <links>
8424                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8425                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8426                 </links>
8427         </class>
8428         <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">
8429                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8430                         <field name="object_id" reporter:datatype="text"/>
8431                         <field name="grantable" reporter:datatype="bool"/>
8432                         <field name="id" reporter:datatype="id" />
8433                         <field name="perm" reporter:datatype="link"/>
8434                         <field name="usr" reporter:datatype="link"/>
8435                         <field name="object_type" reporter:datatype="text"/>
8436                 </fields>
8437                 <links>
8438                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8439                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8440                 </links>
8441         </class>
8442         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8443                 <fields oils_persist:primary="id" oils_persist:sequence="">
8444                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8445                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8446                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8447                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8448                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8449                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8450                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8451                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8452                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8453                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8454                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8455                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8456                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8457                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8458                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8459                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8460                 </fields>
8461                 <links>
8462                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8463                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8464                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8465                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8466                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8467                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8468                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8469                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8470                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8471                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8472                 </links>
8473         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8474             <actions>
8475                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8476                     <context link="xact" jump="usr" field="home_ou"/>
8477                 </retrieve>
8478                         </actions>
8479                 </permacrud>
8480         </class>
8481         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8482                 oils_obj:fieldmapper="money::aged_payment" 
8483                 oils_persist:tablename="money.aged_payment" 
8484                 reporter:label="Payments: Aged">
8485                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8486                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8487                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8488                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8489                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8490                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8491                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8492                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8493                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8494                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8495                         <field name="billing" reporter:datatype="link"/>
8496                 </fields>
8497                 <links>
8498                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8499                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8500                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8501                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8502                 </links>
8503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8504                         <actions>
8505                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8506                                         <context link="xact" field="usr_home_ou"/>
8507                                 </retrieve>
8508                         </actions>
8509                 </permacrud>
8510         </class>
8511         <class id="mallp" controller="open-ils.cstore" 
8512                 oils_obj:fieldmapper="money::all_payments" 
8513                 oils_persist:tablename="money.all_payments" 
8514                 oils_persist="readonly" reporter:core="true"
8515                 reporter:label="Payments: All">
8516                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8517                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8518                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8519                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8520                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8521                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8522                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8523                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8524                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8525                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8526                         <field name="billing" reporter:datatype="link"/>
8527                 </fields>
8528                 <links>
8529                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8530                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8531                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8532                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8533                 </links>
8534         </class>
8535
8536         <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">
8537                 <fields oils_persist:primary="id" oils_persist:sequence="">
8538                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8539                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8540                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8541                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8542                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8543                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8544                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8545                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8546                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8547                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8548                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8549                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8550                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8551                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8552                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8553                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8554                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8555                 </fields>
8556                 <links>
8557                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8558                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8559                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8560                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8561                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8562                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8563                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8564                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8565                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8566                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8567                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8568                 </links>
8569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8570                         <actions>
8571                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8572                                         <context link="xact" jump="usr" field="home_ou"/>
8573                                 </retrieve>
8574                         </actions>
8575                 </permacrud>
8576         </class>
8577         <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">
8578                 <fields oils_persist:primary="id" oils_persist:sequence="">
8579                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8580                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8581                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8582                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8583                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8584                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8585                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8586                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8587                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8588                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8589                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8590                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8591                 </fields>
8592                 <links>
8593                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8594                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8595                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8596                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8597                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8598                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8599                 </links>
8600         </class>
8601         <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">
8602                 <fields oils_persist:primary="id" oils_persist:sequence="">
8603                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8604                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8605                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8606                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8607                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8608                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
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 reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8612                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8613                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8614                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8615                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8616                 </fields>
8617                 <links>
8618                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8619                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8620                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8621                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8622                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8623                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8624                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8625                 </links>
8626         </class>
8627         <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">
8628                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8629                         <field name="bucket" reporter:datatype="link"/>
8630                         <field name="id" reporter:datatype="id" />
8631                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8632                         <field name="create_time" reporter:datatype="timestamp" />
8633                         <field name="pos" reporter:datatype="int" />
8634                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8635                 </fields>
8636                 <links>
8637                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8638                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8639             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8640                 </links>
8641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8642                         <actions>
8643                                 <retrieve permission="ADMIN_COPY_BUCKET">
8644                     <context link="bucket" owning_lib="owning_lib"/>
8645                 </retrieve>
8646             </actions>
8647         </permacrud>
8648         </class>
8649         <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">
8650                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8651                         <field name="id" reporter:datatype="id" />
8652                         <field name="item" reporter:datatype="link"/>
8653                         <field name="note" reporter:datatype="text" />
8654                 </fields>
8655                 <links>
8656                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8657                 </links>
8658         </class>
8659         <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">
8660                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8661                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8662                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8663                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8664                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8665                 </fields>
8666                 <links>
8667                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8668                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8669                 </links>
8670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8671                         <actions>
8672                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8673                         </actions>
8674                 </permacrud>
8675         </class>
8676     <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">
8677         <fields oils_persist:primary="field">
8678             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8679             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8680             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8681         </fields>
8682         <links/>
8683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8684             <actions>
8685                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8686                 <retrieve />
8687                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8688                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8689             </actions>
8690         </permacrud>
8691     </class>
8692         <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">
8693                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8694                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8695                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8696                 </fields>
8697                 <links/>
8698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8699             <actions>
8700                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8701                 <retrieve/>
8702                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8703                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8704             </actions>
8705         </permacrud>
8706         </class>
8707
8708
8709         <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">
8710                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8711                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8712                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8713                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8714                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8715                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8716                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8717                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8718                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8719                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8720                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8721                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8722                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8723                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8724                 </fields>
8725                 <links>
8726                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8727                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8728                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8729                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8730                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8731                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8732                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8733                 </links>
8734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8735             <actions>
8736                 <create permission="TRANSIT_COPY">
8737                     <context link="target_copy" field="owner"/>
8738                 </create>
8739                 <retrieve/>
8740                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8741                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8742             </actions>
8743         </permacrud>
8744         </class>
8745         <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">
8746                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8747                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8748                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8749                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8750                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8751                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8752                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8753                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8754                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8755                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8756                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8757                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8758                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8759                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8760                 </fields>
8761                 <links>
8762                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8763                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8764                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8765                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8766                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8767                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8768                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8769                 </links>
8770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8771             <actions>
8772                 <create permission="TRANSIT_COPY" context_field="owner">
8773                     <context link="target_copy" field="circ_lib"/>
8774                 </create>
8775                 <retrieve/>
8776                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8777                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8778             </actions>
8779         </permacrud>
8780         </class>
8781         <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">
8782                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8783                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8784                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8785                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8786                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8787                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8788                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8789                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8790                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8791                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8792                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8793                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8794                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8795                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8796                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8797                 </fields>
8798                 <links>
8799                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8800                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8801                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8802                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8803                 </links>
8804         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8805             <actions>
8806                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8807                     <context link="xact" jump="usr" field="home_ou"/>
8808                 </retrieve>
8809                         </actions>
8810                 </permacrud>
8811         </class>
8812         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8813                 oils_obj:fieldmapper="money::aged_billing" 
8814                 oils_persist:tablename="money.aged_billing" 
8815                 reporter:label="Aged Billing Line Item">
8816                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8817                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8818                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8819                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8820                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8821                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8822                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8823                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8824                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8825                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8826                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8827                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8828                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8829                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8830                 </fields>
8831                 <links>
8832                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8833                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8834                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8835                 </links>
8836                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8837                         <actions>
8838                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8839                                         <context link="xact" field="usr_home_ou"/>
8840                                 </retrieve>
8841                         </actions>
8842                 </permacrud>
8843         </class>
8844         <class id="mallb" controller="open-ils.cstore" 
8845                 oils_obj:fieldmapper="money::all_billings" 
8846                 oils_persist:tablename="money.all_billings" 
8847                 oils_persist="readonly" reporter:label="All Billing Line Items">
8848                 <fields oils_persist:primary="id" oils_persist:sequence="">
8849                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8850                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8851                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8852                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8853                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8854                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8855                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8856                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8857                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8858                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8859                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8860                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8861                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8862                 </fields>
8863                 <links>
8864                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8865                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8866                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8867                 </links>
8868         </class>
8869         <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">
8870                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8871                         <field name="grp" />
8872                         <field name="id" reporter:datatype="id" />
8873                         <field name="usr" />
8874                 </fields>
8875                 <links>
8876                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8877                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8878                 </links>
8879         </class>
8880         <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">
8881                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8882                         <field name="id" reporter:datatype="id" />
8883                         <field name="fq_field" reporter:datatype="text"/>
8884                         <field name="identity_value" reporter:datatype="text"/>
8885                         <field name="translation" reporter:datatype="text"/>
8886                         <field name="string" reporter:datatype="text"/>
8887                 </fields>
8888                 <links>
8889                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8890                 </links>
8891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8892             <actions>
8893                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8894                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8895                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8896                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8897             </actions>
8898         </permacrud>
8899         </class>
8900         <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">
8901                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8902                         <field name="id" reporter:datatype="id" />
8903                         <field name="fm_class" reporter:datatype="text"/>
8904                         <field name="field" reporter:datatype="text"/>
8905                         <field name="owner" reporter:datatype="org_unit"/>
8906                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8907                 </fields>
8908                 <links>
8909                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8910                 </links>
8911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8912             <actions>
8913                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8914                 <retrieve/>
8915                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8916                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8917             </actions>
8918         </permacrud>
8919         </class>
8920         <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">
8921                 <fields oils_persist:primary="code">
8922                         <field name="code" reporter:datatype="id" />
8923                         <field name="marc_code" reporter:datatype="text"/>
8924                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8925                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8926                         <field name="rtl" reporter:datatype="bool"/>
8927                 </fields>
8928                 <links/>
8929         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8930             <actions>
8931                 <create permission="CREATE_LOCALE" global_required="true"/>
8932                 <retrieve/>
8933                 <update permission="UPDATE_LOCALE" global_required="true"/>
8934                 <delete permission="DELETE_LOCALE" global_required="true"/>
8935             </actions>
8936         </permacrud>
8937         </class>
8938         <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">
8939                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8940                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
8941                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
8942                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
8943                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8944                 </fields>
8945                 <links>
8946                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8947                 </links>
8948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8949             <actions>
8950                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8951                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8952                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8953                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8954             </actions>
8955         </permacrud>
8956         </class>
8957
8958         <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">
8959                 <fields oils_persist:primary="id">
8960                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8961                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8962                 </fields>
8963                 <links/>
8964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8965             <actions>
8966                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8967                 <retrieve/>
8968                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8969                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8970             </actions>
8971         </permacrud>
8972         </class>
8973
8974         <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">
8975                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8976                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8977                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8978                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8979                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8980                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8981                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8982                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8983                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8984                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8985                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8986                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8987                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8988                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8989                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8990                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8991                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8992                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8993                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8994                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8995                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8996                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8997                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8998                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8999                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9000                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9001                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9002                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9003                 </fields>
9004                 <links>
9005                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9006                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9007                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9008                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9009                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9010                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9011                 </links>
9012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9013             <actions>
9014                 <create permission="user_request.create">
9015                     <context link="usr" field="home_ou"/>
9016                                 </create>
9017                 <retrieve permission="user_request.view">
9018                     <context link="usr" field="home_ou"/>
9019                                 </retrieve>
9020                 <update permission="user_request.update">
9021                     <context link="usr" field="home_ou"/>
9022                                 </update>
9023                 <delete permission="user_request.delete">
9024                     <context link="usr" field="home_ou"/>
9025                                 </delete>
9026             </actions>
9027         </permacrud>
9028         </class>
9029
9030         <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">
9031         <oils_persist:source_definition><![CDATA[
9032             SELECT r.*, CASE
9033                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
9034                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
9035                         WHEN l.state = 'received' THEN 5 -- Received
9036                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
9037                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
9038                         WHEN l.id IS NOT NULL THEN 2 -- Pending
9039                         WHEN l.id IS NULL THEN 1 -- New
9040                         ELSE 0 -- Error
9041                     END AS request_status
9042                     ,u.home_ou
9043             FROM      acq.user_request r
9044             JOIN actor.usr u ON (r.usr = u.id)
9045             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
9046             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
9047             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
9048         ]]></oils_persist:source_definition>
9049                 <fields oils_persist:primary="id">
9050                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9051                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9052                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
9053                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
9054                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
9055                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
9056                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
9057                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
9058                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9059                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
9060                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
9061                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
9062                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
9063                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
9064                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
9065                         <field reporter:label="Title" name="title" reporter:datatype="text" />
9066                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
9067                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9068                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
9069                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
9070                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
9071                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
9072                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
9073                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
9074                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
9075                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9076                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
9077                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
9078                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
9079                 </fields>
9080                 <links>
9081                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9082                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9083                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9084                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
9085                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
9086                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9087                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
9088                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9089                 </links>
9090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9091             <actions>
9092                 <retrieve permission="user_request.view">
9093                     <context link="usr" field="home_ou"/>
9094                                 </retrieve>
9095             </actions>
9096         </permacrud>
9097         </class>
9098
9099         <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">
9100                 <fields oils_persist:primary="id">
9101                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9102                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9103                 </fields>
9104                 <links/>
9105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9106             <actions>
9107                 <retrieve/>
9108             </actions>
9109         </permacrud>
9110         </class>
9111
9112         <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">
9113                 <fields oils_persist:primary="code">
9114                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
9115                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
9116                 </fields>
9117                 <links/>
9118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9119             <actions>
9120                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9121                 <retrieve/>
9122                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9123                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9124             </actions>
9125         </permacrud>
9126         </class>
9127
9128         <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">
9129                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
9130                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
9131                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
9132                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
9133                         <field reporter:label="Ratio" name="ratio" />
9134                 </fields>
9135                 <links>
9136                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
9137                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
9138                 </links>
9139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9140                         <actions>
9141                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9142                                 <retrieve/>
9143                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9144                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
9145                         </actions>
9146                 </permacrud>
9147         </class>
9148
9149         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
9150                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
9151                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9152                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9153                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
9154                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true"/>
9155                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
9156                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
9157                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
9158                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
9159                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
9160                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9161                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9162                         <field reporter:label="URL" name="url" reporter:datatype="text" />
9163                         <field reporter:label="Email" name="email" reporter:datatype="text" />
9164                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
9165                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
9166                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
9167                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
9168                         <field reporter:label="Primary Contact" name="primary_contact" reporter:datatype="link" />
9169                         <field reporter:label="Contacts" name="contacts" oils_persist:virtual="true" reporter:datatype="link" />
9170                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
9171                         <field reporter:label="Holdings Subfields" name="holdings_subfields" oils_persist:virtual="true" reporter:datatype="link" />
9172                         <field reporter:label="Attribute Definitions" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9173                         <field reporter:label="EDI Accounts" name="edi_accounts" oils_persist:virtual="true" reporter:datatype="link" />
9174                 </fields>
9175                 <links>
9176                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9177                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9178                         <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
9179                         <link field="contacts" reltype="has_many" map="" key="provider" class="acqpc"/>
9180                         <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
9181                         <link field="primary_contact" reltype="has_a" map="" key="id" class="acqpc"/>
9182                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
9183                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
9184                         <link field="holdings_subfields" reltype="has_many" map="" key="provider" class="acqphsm"/>
9185                         <link field="attributes" reltype="has_many" map="" key="provider" class="acqlipad"/>
9186                         <link field="edi_accounts" reltype="has_many" map="" key="provider" class="acqedi"/>
9187                 </links>
9188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9189             <actions>
9190                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
9191                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
9192                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
9193                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
9194             </actions>
9195         </permacrud>
9196         </class>
9197
9198         <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">
9199                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
9200                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9201                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9202                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9203                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9204                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9205                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9206                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9207                 </fields>
9208                 <links>
9209                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9210                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9211                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9212                 </links>
9213         </class>
9214
9215         <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">
9216                 <fields oils_persist:primary="code">
9217                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
9218                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9219                 </fields>
9220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9221             <actions>
9222                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9223                 <retrieve/>
9224                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9225                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
9226             </actions>
9227                 </permacrud>
9228         </class>
9229
9230         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
9231                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
9232                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
9233                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
9234                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9235                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
9236                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
9237                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
9238                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
9239                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
9240                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
9241                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
9242                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9243                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
9244                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
9245                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
9246                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
9247                 </fields>
9248                 <links>
9249                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
9250                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9251                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
9252                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
9253                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
9254                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
9255                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
9256                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
9257                 </links>
9258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9259             <actions>
9260                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
9261                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
9262                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
9263                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
9264             </actions>
9265         </permacrud>
9266         </class>
9267
9268         <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">
9269                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
9270                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9271                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9272                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9273                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
9274                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
9275                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
9276                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9277                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
9278                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9279                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9280                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9281                 </fields>
9282                 <links>
9283                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9284                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9285                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9286                 </links>
9287         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9288             <actions>
9289                 <create   permission="ADMIN_INVOICE">
9290                                         <context link="invoice" field="receiver"/>
9291                                 </create>
9292                 <retrieve permission="ADMIN_INVOICE">
9293                                         <context link="invoice" field="receiver"/>
9294                                 </retrieve>
9295                 <update   permission="ADMIN_INVOICE">
9296                                         <context link="invoice" field="receiver"/>
9297                                 </update>
9298                                 <delete   permission="ADMIN_INVOICE">
9299                                         <context link="invoice" field="receiver"/>
9300                                 </delete>
9301             </actions>
9302         </permacrud>
9303         </class>
9304
9305         <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">
9306                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
9307                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9308                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
9309                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9310                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9311                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
9312                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
9313                         <field reporter:label="Author" name="author" reporter:datatype="text" />
9314                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9315                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
9316                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
9317                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9318                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
9319                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
9320                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9321                 </fields>
9322                 <links>
9323                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
9324                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9325                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9326                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9327                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9328                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
9329                 </links>
9330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9331             <actions>
9332                 <create   permission="ADMIN_INVOICE">
9333                                         <context link="invoice" field="receiver"/>
9334                                 </create>
9335                 <retrieve permission="ADMIN_INVOICE">
9336                                         <context link="invoice" field="receiver"/>
9337                                 </retrieve>
9338                 <update   permission="ADMIN_INVOICE">
9339                                         <context link="invoice" field="receiver"/>
9340                                 </update>
9341                                 <delete   permission="ADMIN_INVOICE">
9342                                         <context link="invoice" field="receiver"/>
9343                                 </delete>
9344             </actions>
9345         </permacrud>
9346         </class>
9347
9348         <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">
9349                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
9350                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
9351                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9352                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9353                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9354                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9355                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9356                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text" oils_obj:required="true"/>
9357                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9358                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9359                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
9360                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
9361                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9362                 </fields>
9363                 <links>
9364                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9365                 </links>
9366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9367             <actions>
9368                 <create permission="ADMIN_PROVIDER">
9369                     <context link="provider" field="owner"/>
9370                 </create>
9371                 <retrieve permission="ADMIN_PROVIDER">
9372                     <context link="provider" field="owner"/>
9373                 </retrieve>
9374                 <update permission="ADMIN_PROVIDER">
9375                     <context link="provider" field="owner"/>
9376                 </update>
9377                 <delete permission="ADMIN_PROVIDER">
9378                     <context link="provider" field="owner"/>
9379                 </delete>
9380             </actions>
9381         </permacrud>
9382         </class>
9383
9384         <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">
9385                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9386                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9387                         <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true"/>
9388                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9389                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9390                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9391                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9392                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
9393         </fields>
9394                 <links>
9395                         <link field="addresses" reltype="has_many" key="contact" map="" class="acqpca"/>
9396                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9397                 </links>
9398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9399             <actions>
9400                 <create permission="ADMIN_PROVIDER">
9401                     <context link="provider" field="owner"/>
9402                 </create>
9403                 <retrieve permission="ADMIN_PROVIDER">
9404                     <context link="provider" field="owner"/>
9405                 </retrieve>
9406                 <update permission="ADMIN_PROVIDER">
9407                     <context link="provider" field="owner"/>
9408                 </update>
9409                 <delete permission="ADMIN_PROVIDER">
9410                     <context link="provider" field="owner"/>
9411                 </delete>
9412             </actions>
9413         </permacrud>
9414     </class>
9415         <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">
9416                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9417                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9418                         <field reporter:label="City" name="city"  reporter:datatype="text" oils_obj:required="true"/>
9419                         <field reporter:label="Country" name="country"  reporter:datatype="text" oils_obj:required="true"/>
9420                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9421                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9422                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text" oils_obj:required="true"/>
9423                         <field reporter:label="State" name="state"  reporter:datatype="text" oils_obj:required="true"/>
9424                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text" oils_obj:required="true"/>
9425                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9426                         <field reporter:label="Contact" name="contact" reporter:datatype="link" oils_obj:required="true"/>
9427                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9428                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9429                 </fields>
9430                 <links>
9431                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9432                 </links>
9433         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9434             <actions>
9435                 <create permission="ADMIN_PROVIDER">
9436                     <context link="contact" jump='provider' field="owner"/>
9437                 </create>
9438                 <retrieve permission="ADMIN_PROVIDER">
9439                     <context link="contact" jump='provider' field="owner"/>
9440                 </retrieve>
9441                 <update permission="ADMIN_PROVIDER">
9442                     <context link="contact" jump='provider' field="owner"/>
9443                 </update>
9444                 <delete permission="ADMIN_PROVIDER">
9445                     <context link="contact" jump='provider' field="owner"/>
9446                 </delete>
9447             </actions>
9448         </permacrud>
9449         </class>
9450
9451         <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">
9452                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9453                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9454                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9455                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9456                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9457                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9458                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9459                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9460                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9461                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9462                 </fields>
9463                 <links>
9464                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9465                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9466                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9467                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9468                 </links>
9469         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9470             <actions>
9471                 <create permission="ADMIN_ACQ_FUND">
9472                     <context link="src_fund" field="org"/>
9473                 </create>
9474                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9475                     <context link="src_fund" field="org"/>
9476                     <context link="dest_fund" field="org"/>
9477                 </retrieve>
9478                 <update permission="ADMIN_ACQ_FUND">
9479                     <context link="src_fund" field="org"/>
9480                 </update>
9481                 <delete permission="ADMIN_ACQ_FUND">
9482                     <context link="src_fund" field="org"/>
9483                 </delete>
9484             </actions>
9485         </permacrud>
9486         </class>
9487
9488         <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">
9489                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9490                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9491                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9492                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9493                 </fields>
9494                 <links>
9495             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9496                 </links>
9497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9498                         <actions>
9499                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9500                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9501                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9502                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9503                         </actions>
9504                 </permacrud>
9505         </class>
9506
9507         <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">
9508                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9509                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9510                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9511                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9512                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9513                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9514                 </fields>
9515                 <links>
9516                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9517                 </links>
9518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9519                         <actions>
9520                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9521                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9522                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9523                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9524                         </actions>
9525                 </permacrud>
9526         </class>
9527
9528         <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">
9529                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9530                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9531                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
9532                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true" />
9533                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" oils_obj:required="true" />
9534                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9535                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9536                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9537                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9538                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9539                 </fields>
9540                 <links>
9541                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9542                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9543             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9544             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9545                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9546                 </links>
9547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9548             <actions>
9549                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9550                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9551                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9552                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9553             </actions>
9554         </permacrud>
9555         </class>
9556
9557         <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">
9558                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9559                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9560                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
9561                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
9562                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9563                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9564                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9565                 </fields>
9566                 <links>
9567                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9568                 </links>
9569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9570                         <actions>
9571                                 <create permission="ADMIN_FUNDING_SOURCE">
9572                     <context link="funding_source" field="owner"/>
9573                 </create>
9574                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9575                     <context link="funding_source" field="owner"/>
9576                 </retrieve>
9577                                 <update permission="ADMIN_FUNDING_SOURCE">
9578                     <context link="funding_source" field="owner"/>
9579                 </update>
9580                                 <delete permission="ADMIN_FUNDING_SOURCE">
9581                     <context link="funding_source" field="owner"/>
9582                 </delete>
9583                         </actions>
9584                 </permacrud>
9585         </class>
9586
9587         <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">
9588                 <fields oils_persist:primary="id">
9589                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9590                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9591                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9592                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9593                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9594                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9595                 </fields>
9596                 <links>
9597                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9598                 </links>
9599         </class>
9600
9601         <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">
9602                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9603                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9604                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9605                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9606                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9607                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9608                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9609                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9610                         <field reporter:label="Debit Time" name="create_time" reporter:datatype="timestamp" />
9611                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9612                         <field reporter:label="Invoice Items" name="invoice_items" reporter:datatype="link" oils_persist:virtual="true"/>
9613                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9614                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9615                 </fields>
9616                 <links>
9617                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9618                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9619                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9620                         <link field="invoice_items" reltype="has_many" key="fund_debit" map="" class="acqii"/>
9621                         <link field="po_items" reltype="has_many" key="fund_debit" map="" class="acqpoi"/>
9622                         <link field="lineitem_details" reltype="has_many" key="fund_debit" map="" class="acqlid"/>
9623                 </links>
9624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9625                         <actions>
9626                                 <create permission="ADMIN_ACQ_FUND">
9627                     <context link="fund" field="org"/>
9628                 </create>
9629                                 <retrieve permission="ADMIN_ACQ_FUND">
9630                     <context link="fund" field="org"/>
9631                 </retrieve>
9632                                 <update permission="ADMIN_ACQ_FUND">
9633                     <context link="fund" field="org"/>
9634                 </update>
9635                                 <delete permission="ADMIN_ACQ_FUND">
9636                     <context link="fund" field="org"/>
9637                 </delete>
9638                         </actions>
9639                 </permacrud>
9640         </class>
9641
9642         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9643                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9644                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9645                         <field reporter:label="Owner" name="org" reporter:datatype="org_unit" oils_obj:required="true" />
9646                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
9647                         <field reporter:label="Year" name="year" reporter:datatype="int" oils_obj:required="true" />
9648                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" oils_obj:required="true" />
9649                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true" />
9650                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9651                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9652                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9653                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9654                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9655                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9656                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9657                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9658                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9659                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9660                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9661                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9662                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9663                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9664                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9665                 </fields>
9666                 <links>
9667                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9668                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9669             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9670             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9671             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9672             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9673             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9674             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9675             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9676             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9677             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9678                 </links>
9679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9680             <actions>
9681                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9682                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9683                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9684                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9685             </actions>
9686         </permacrud>
9687         </class>
9688
9689         <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">
9690                 <fields oils_persist:primary="fund">
9691                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9692                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9693                 </fields>
9694                 <links>
9695                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9696                 </links>
9697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9698             <actions>
9699                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9700                                         <context link="fund" field="org" />
9701                 </retrieve>
9702             </actions>
9703         </permacrud>
9704         </class>
9705
9706         <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">
9707                 <fields oils_persist:primary="fund">
9708                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9709                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9710                 </fields>
9711                 <links>
9712                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9713                 </links>
9714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9715             <actions>
9716                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9717                                         <context link="fund" field="org" />
9718                 </retrieve>
9719             </actions>
9720         </permacrud>
9721         </class>
9722
9723         <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">
9724                 <fields oils_persist:primary="fund">
9725                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9726                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9727                 </fields>
9728                 <links>
9729                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9730                 </links>
9731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9732             <actions>
9733                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9734                                         <context link="fund" field="org" />
9735                 </retrieve>
9736             </actions>
9737         </permacrud>
9738         </class>
9739
9740         <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">
9741                 <fields oils_persist:primary="fund">
9742                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9743                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9744                 </fields>
9745                 <links>
9746                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9747                 </links>
9748         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9749             <actions>
9750                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9751                                         <context link="fund" field="org" />
9752                 </retrieve>
9753             </actions>
9754         </permacrud>
9755         </class>
9756
9757         <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">
9758                 <fields oils_persist:primary="fund">
9759                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9760                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9761                 </fields>
9762                 <links>
9763                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9764                 </links>
9765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9766             <actions>
9767                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9768                                         <context link="fund" field="org" />
9769                 </retrieve>
9770             </actions>
9771         </permacrud>
9772         </class>
9773
9774    <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">
9775         <fields oils_persist:primary="fund">
9776             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9777             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9778         </fields>
9779         <links>
9780             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9781         </links>
9782     </class>
9783
9784    <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">
9785         <fields oils_persist:primary="fund">
9786             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9787             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9788         </fields>
9789         <links>
9790             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9791         </links>
9792     </class>
9793
9794    <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">
9795         <fields oils_persist:primary="fund">
9796             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9797             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9798         </fields>
9799         <links>
9800             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9801         </links>
9802     </class>
9803
9804    <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">
9805         <fields oils_persist:primary="fund">
9806             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9807             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9808         </fields>
9809         <links>
9810             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9811         </links>
9812     </class>
9813
9814    <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">
9815         <fields oils_persist:primary="fund">
9816             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9817             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9818         </fields>
9819         <links>
9820             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9821         </links>
9822     </class>
9823
9824         <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">
9825                 <fields oils_persist:primary="funding_source">
9826                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9827                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9828                 </fields>
9829                 <links>
9830                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9831                 </links>
9832         </class>
9833
9834         <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">
9835                 <fields oils_persist:primary="funding_source">
9836                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9837                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9838                 </fields>
9839                 <links>
9840                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9841                 </links>
9842         </class>
9843
9844         <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">
9845                 <fields oils_persist:primary="funding_source">
9846                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9847                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9848                 </fields>
9849                 <links>
9850                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9851                 </links>
9852         </class>
9853
9854         <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">
9855                 <fields oils_persist:primary="fund">
9856                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9857                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9858                 </fields>
9859                 <links>
9860                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9861                 </links>
9862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9863             <actions>
9864                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9865                                         <context link="fund" field="org" />
9866                 </retrieve>
9867             </actions>
9868         </permacrud>
9869     </class>
9870     <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">
9871         <oils_persist:source_definition><![CDATA[
9872             SELECT
9873                 acqf.*,
9874                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9875                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9876                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9877                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9878             FROM
9879                 acq.fund acqf
9880                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9881                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9882                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9883                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9884         ]]></oils_persist:source_definition>
9885         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9886             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9887             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
9888             <field reporter:label="Name" name="name" reporter:datatype="text" />
9889             <field reporter:label="Year" name="year" reporter:datatype="int" />
9890             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9891             <field reporter:label="Code" name="code" reporter:datatype="text" />
9892             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9893             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9894             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9895             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9896             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9897
9898             <!-- non fund-native fields -->
9899             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9900             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9901             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9902             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9903         </fields>
9904         <links>
9905             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9906             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9907             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9908         </links>
9909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9910             <actions>
9911                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9912             </actions>
9913         </permacrud>
9914         </class>
9915         <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">
9916                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9917                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9918                         <field reporter:label="Fund" name="fund" reporter:datatype="link" oils_obj:required="true" />
9919                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" oils_obj:required="true" />
9920                         <field reporter:label="Amount" name="amount" reporter:datatype="money" oils_obj:required="true" />
9921                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" oils_obj:required="true" />
9922                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9923                         <field reporter:label="Allocation Time" name="create_time" reporter:datatype="timestamp" />
9924                 </fields>
9925                 <links>
9926                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9927                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9928                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9929                 </links>
9930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9931                         <actions>
9932                                 <create permission="ADMIN_ACQ_FUND">
9933                     <context link="fund" field="org"/>
9934                 </create>
9935                                 <retrieve permission="ADMIN_ACQ_FUND">
9936                     <context link="fund" field="org"/>
9937                 </retrieve>
9938                                 <update permission="ADMIN_ACQ_FUND">
9939                     <context link="fund" field="org"/>
9940                 </update>
9941                                 <delete permission="ADMIN_ACQ_FUND">
9942                     <context link="fund" field="org"/>
9943                 </delete>
9944                         </actions>
9945                 </permacrud>
9946         </class>
9947
9948     <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">
9949         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9950             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9951             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9952             <field reporter:label="Owner" name="org" reporter:datatype="org_unit" />
9953             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9954             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9955             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9956             <field reporter:label="Note" name="note" reporter:datatype="text" />
9957             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9958         </fields>
9959         <links>
9960             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9961             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9962             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9963         </links>
9964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9965                         <actions>
9966                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9967                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9968                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9969                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9970                         </actions>
9971                 </permacrud>
9972     </class>
9973
9974         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9975                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9976                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9977                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9978                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9979                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9980                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9981                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9982                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9983                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9984                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9985                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9986                 </fields>
9987                 <links>
9988                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9989                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9990                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9991                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9992                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9993                 </links>
9994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9995                         <actions>
9996                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9997                         </actions>
9998                 </permacrud>
9999         </class>
10000
10001         <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">
10002                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
10003                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
10004                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
10005                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10006                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
10007                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
10008                 </fields>
10009                 <links>
10010                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10011                 </links>
10012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10013                         <actions>
10014                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10015                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
10016                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10017                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
10018                         </actions>
10019                 </permacrud>
10020         </class>
10021
10022         <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">
10023                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
10024                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
10025                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
10026                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10027                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10028                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10029                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10030                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
10031                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10032                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10033                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
10034                         <field reporter:label="Name" name="name" reporter:datatype="text" />
10035                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10036                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10037                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
10038                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
10039                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
10040                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
10041                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
10042                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
10043                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
10044                 </fields>
10045                 <links>
10046                         <link field="state" reltype="has_a" key="id" map="" class="acqpostlbl"/>
10047                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10048                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10049                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10050                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
10051                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10052                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
10053                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
10054                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
10055                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10056                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10057                 </links>
10058                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10059                         <actions>
10060                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10061                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10062                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10063                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
10064                         </actions>
10065                 </permacrud>
10066         </class>
10067
10068         <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">
10069                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
10070                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10071                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10072                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10073                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
10074                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10075                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10076                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10077                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10078                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10079                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10080                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10081                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10082                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
10083                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10084                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10085                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
10086                 </fields>
10087                 <links>
10088                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
10089                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10090                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10091                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10092                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10093                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10094                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10095                 </links>
10096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10097             <actions>
10098                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
10099             </actions>
10100                 </permacrud>
10101         </class>
10102
10103         <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">
10104                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
10105                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
10106                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10107                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10108                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10109                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10110                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10111                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
10112                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10113                 </fields>
10114                 <links>
10115                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10116                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10117                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10118                 </links>
10119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10120             <actions>
10121                 <create permission="CREATE_PURCHASE_ORDER">
10122                     <context link="purchase_order" field="ordering_agency"/>
10123                 </create>
10124                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10125                     <context link="purchase_order" field="ordering_agency"/>
10126                 </retrieve>
10127                 <update permission="CREATE_PURCHASE_ORDER">
10128                     <context link="purchase_order" field="ordering_agency"/>
10129                 </update>
10130                 <delete permission="CREATE_PURCHASE_ORDER">
10131                     <context link="purchase_order" field="ordering_agency"/>
10132                 </delete>
10133             </actions>
10134                 </permacrud>
10135         </class>
10136
10137         <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">
10138                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
10139                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10140                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10141                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10142                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
10143                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
10144                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
10145                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10146                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
10147                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10148                         <field reporter:label="Target" name="target" reporter:datatype="int" />
10149                 </fields>
10150                 <links>
10151                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10152                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10153                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
10154                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10155                 </links>
10156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10157             <actions>
10158                 <create permission="CREATE_PURCHASE_ORDER">
10159                     <context link="purchase_order" field="ordering_agency"/>
10160                 </create>
10161                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10162                     <context link="purchase_order" field="ordering_agency"/>
10163                 </retrieve>
10164                 <update permission="CREATE_PURCHASE_ORDER">
10165                     <context link="purchase_order" field="ordering_agency"/>
10166                 </update>
10167                 <delete permission="CREATE_PURCHASE_ORDER">
10168                     <context link="purchase_order" field="ordering_agency"/>
10169                 </delete>
10170             </actions>
10171                 </permacrud>
10172         </class>
10173
10174         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
10175                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
10176                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
10177                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
10178                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
10179                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
10180                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10181                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10182                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10183                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
10184                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
10185                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
10186                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
10187                         <field reporter:label="Status" name="state" reporter:datatype="link" />
10188                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10189                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10190                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
10191                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10192                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10193                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10194                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
10195                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
10196                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
10197                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
10198                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
10199                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
10200                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
10201                 </fields>
10202                 <links>
10203                         <link field="state" reltype="has_a" key="id" map="" class="jubstlbl"/>
10204                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10205                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10206                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10207                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10208                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10209                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10210                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10211                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
10212                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
10213                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
10214                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10215                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
10216                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10217                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
10218                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
10219                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10220                 </links>
10221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10222                         <actions>
10223                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10224                                         <context link="purchase_order" field="ordering_agency"/>
10225                                         <context link="picklist" field="org_unit"/>
10226                                 </retrieve>
10227                         </actions>
10228                 </permacrud>
10229         </class>
10230
10231         <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">
10232                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
10233                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
10234                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
10235                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
10236                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
10237                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10238                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
10239                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
10240                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
10241                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10242                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
10243                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
10244                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10245                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
10246                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
10247                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
10248                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
10249                         <field reporter:label="Status" name="state" reporter:datatype="text"/>
10250                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
10251                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
10252                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
10253                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
10254                 </fields>
10255                 <links>
10256                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
10257                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10258                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10259                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
10260                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10261                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10262                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
10263                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
10264                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10265                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10266                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
10267                 </links>
10268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10269                         <actions>
10270                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
10271                                         <context link="purchase_order" field="ordering_agency"/>
10272                                         <context link="picklist" field="org_unit"/>
10273                                 </retrieve>
10274                         </actions>
10275                 </permacrud>
10276         </class>
10277
10278         <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">
10279                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
10280                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
10281                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10282                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10283                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10284                 </fields>
10285                 <links>
10286                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10287                 </links>
10288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10289                         <actions>
10290                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10291                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
10292                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10293                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
10294                         </actions>
10295                 </permacrud>
10296         </class>
10297
10298         <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">
10299                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
10300                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
10301                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
10302                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
10303                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
10304                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
10305                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
10306                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
10307                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
10308                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
10309                 </fields>
10310                 <links>
10311                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10312                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
10313                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10314                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
10315                 </links>
10316         </class>
10317
10318         <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">
10319                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
10320                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
10321                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
10322                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
10323                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
10324                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
10325                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
10326                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
10327                 </fields>
10328                 <links>
10329                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10330                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
10331                 </links>
10332         </class>
10333
10334         <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">
10335                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
10336                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
10337                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
10338                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
10339                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
10340                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
10341                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
10342                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
10343                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
10344                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
10345                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10346                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
10347                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
10348                         <field reporter:label="Note" name="note" reporter:datatype="text" />
10349                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
10350                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
10351                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
10352                 </fields>
10353                 <links>
10354                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10355                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
10356                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10357                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10358                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10359                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10360                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10361                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
10362                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
10363                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
10364                 </links>
10365         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10366             <actions>
10367                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
10368                     <context link="lineitem" jump="purchase_order" field="ordering_agency"/>
10369                     <context link="lineitem" jump="picklist" field="org_unit"/>
10370                 </retrieve>
10371             </actions>
10372         </permacrud>
10373         </class>
10374
10375         <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">
10376                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10377                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10378                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10379                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10380                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10381                 </fields>
10382                 <links/>
10383                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10384                         <actions>
10385                                 <retrieve />
10386                         </actions>
10387                 </permacrud>
10388         </class>
10389
10390         <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">
10391                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10392                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10393                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10394                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10395                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10396                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10397             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10398                 </fields>
10399                 <links/>
10400         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10401             <actions>
10402                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10403                 <retrieve />
10404                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10405                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
10406             </actions>
10407         </permacrud>
10408         </class>
10409
10410         <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">
10411                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10412                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10413                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10414                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10415                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10416                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10417                 </fields>
10418                 <links/>
10419         </class>
10420         <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">
10421                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10422                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10423                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10424                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10425                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10426                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10427                 </fields>
10428                 <links>
10429                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10430                 </links>
10431         </class>
10432
10433         <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">
10434             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10435                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10436                 <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true" />
10437                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
10438                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true" />
10439                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10440                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10441         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10442
10443             </fields>
10444             <links>
10445                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10446             </links>
10447             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10448                 <actions>
10449                     <create permission="ADMIN_PROVIDER">
10450                         <context link="provider" field="owner"/>
10451                     </create>
10452                     <retrieve permission="ADMIN_PROVIDER">
10453                         <context link="provider" field="owner"/>
10454                     </retrieve>
10455                     <update permission="ADMIN_PROVIDER">
10456                         <context link="provider" field="owner"/>
10457                     </update>
10458                     <delete permission="ADMIN_PROVIDER">
10459                         <context link="provider" field="owner"/>
10460                     </delete>
10461                 </actions>
10462             </permacrud>
10463         </class>
10464         
10465         <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">
10466             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10467                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10468                 <field reporter:label="Provider" name="provider" reporter:datatype="link" oils_obj:required="true" />
10469                 <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" />
10470                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" oils_obj:required="true" />
10471             </fields>
10472             <links>
10473                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10474             </links>
10475             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10476                 <actions>
10477                     <create permission="ADMIN_PROVIDER">
10478                         <context link="provider" field="owner"/>
10479                     </create>
10480                     <retrieve permission="ADMIN_PROVIDER">
10481                         <context link="provider" field="owner"/>
10482                     </retrieve>
10483                     <update permission="ADMIN_PROVIDER">
10484                         <context link="provider" field="owner"/>
10485                     </update>
10486                     <delete permission="ADMIN_PROVIDER">
10487                         <context link="provider" field="owner"/>
10488                     </delete>
10489                 </actions>
10490             </permacrud>
10491         </class>
10492         
10493         <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">
10494             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10495                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10496                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10497                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10498                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10499                 </fields>
10500                 <links/>
10501         </class>
10502
10503         <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">
10504                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10505                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10506                         <field name="label"         reporter:datatype="text"      reporter:label="Label" oils_obj:required="true"/>
10507                         <field name="host"          reporter:datatype="text"      reporter:label="Host" oils_obj:required="true"/>
10508                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10509                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10510                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10511                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10512                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner" oils_obj:required="true"/>
10513                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10514                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider" oils_obj:required="true"/>
10515                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10516                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10517                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10518                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10519                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes" oils_obj:required="true"/>
10520                 </fields>
10521                 <links>
10522                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10523                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10524                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10525                 </links>
10526         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10527             <actions>
10528                 <create permission="ADMIN_PROVIDER">
10529                     <context link="provider" field="owner"/>
10530                 </create>
10531                 <retrieve permission="ADMIN_PROVIDER">
10532                     <context link="provider" field="owner"/>
10533                 </retrieve>
10534                 <update permission="ADMIN_PROVIDER">
10535                     <context link="provider" field="owner"/>
10536                 </update>
10537                 <delete permission="ADMIN_PROVIDER">
10538                     <context link="provider" field="owner"/>
10539                 </delete>
10540             </actions>
10541         </permacrud>
10542         </class>
10543
10544         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10545                 oils_obj:fieldmapper="acq::edi_attr" 
10546                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10547                 <fields oils_persist:primary="key">
10548                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10549                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10550                 </fields>
10551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10552             <actions>
10553                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10554                 <retrieve/>
10555                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10556                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10557             </actions>
10558         </permacrud>
10559         </class>
10560         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10561                 oils_obj:fieldmapper="acq::edi_attr_set" 
10562                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10563                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10564                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10565                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10566                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10567                         <field name="edi_accounts" reporter:datatype="link" oils_persist:virtual="true" reporter:label="EDI Accounts"/>
10568                 </fields>
10569                 <links>
10570                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10571                         <link field="edi_accounts" reltype="has_many" key="attr_set" map="" class="acqedi"/>
10572                 </links>
10573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10574             <actions>
10575                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10576                 <retrieve/>
10577                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10578                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10579             </actions>
10580         </permacrud>
10581         </class>
10582         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10583                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10584                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10585                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10586                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10587                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10588                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10589                 </fields>
10590                 <links>
10591                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10592                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10593                 </links>
10594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10595             <actions>
10596                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10597                 <retrieve/>
10598                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10599                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10600             </actions>
10601         </permacrud>
10602         </class>
10603
10604
10605         <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">
10606                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10607                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10608                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10609                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10610                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10611                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10612                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10613                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10614                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10615                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10616                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10617                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10618                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10619                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10620                 </fields>
10621                 <links>
10622                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10623                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10624                 </links>
10625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10626             <actions>
10627                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10628                     <context link="account" jump="provider" field="owner"/>
10629                 </retrieve>
10630                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10631                     <context link="account" jump="provider" field="owner"/>
10632                 </update>
10633                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10634                     <context link="account" jump="provider" field="owner"/>
10635                 </delete>
10636             </actions>
10637         </permacrud>
10638         </class>
10639
10640
10641         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10642                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10643                         <field name="id" reporter:datatype="id" />
10644                         <field name="parent" reporter:datatype="link"/>
10645                         <field name="owner" reporter:datatype="link"/>
10646                         <field name="create_time" reporter:datatype="timestamp"/>
10647                         <field name="name" reporter:datatype="text"/>
10648                         <field name="shared" reporter:datatype="bool"/>
10649                         <field name="share_with" reporter:datatype="link"/>
10650                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10651                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10652                 </fields>
10653                 <links>
10654                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10655                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10656                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10657                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10658                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10659                 </links>
10660         </class>
10661         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10662                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10663                         <field name="id" reporter:datatype="id" />
10664                         <field name="parent" reporter:datatype="link"/>
10665                         <field name="owner" reporter:datatype="link"/>
10666                         <field name="create_time" reporter:datatype="timestamp"/>
10667                         <field name="name" reporter:datatype="text"/>
10668                         <field name="shared" reporter:datatype="bool"/>
10669                         <field name="share_with" reporter:datatype="link"/>
10670                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10671                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10672                 </fields>
10673                 <links>
10674                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10675                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10676                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10677                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10678                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10679                 </links>
10680         </class>
10681         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10682                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10683                         <field name="id" reporter:datatype="id" />
10684                         <field name="parent" reporter:datatype="link"/>
10685                         <field name="owner" reporter:datatype="link"/>
10686                         <field name="create_time" reporter:datatype="timestamp"/>
10687                         <field name="name" reporter:datatype="text"/>
10688                         <field name="shared" reporter:datatype="bool"/>
10689                         <field name="share_with" reporter:datatype="link"/>
10690                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10691                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10692                 </fields>
10693                 <links>
10694                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10695                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10696                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10697                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10698                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10699                 </links>
10700         </class>
10701         <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">
10702                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10703                         <field name="id" reporter:datatype="id" />
10704                         <field name="owner" reporter:datatype="link"/>
10705                         <field name="create_time" reporter:datatype="timestamp"/>
10706                         <field name="name" reporter:datatype="text"/>
10707                         <field name="data" reporter:datatype="text"/>
10708                         <field name="folder" reporter:datatype="link"/>
10709                         <field name="description" reporter:datatype="text"/>
10710                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10711                 </fields>
10712                 <links>
10713                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10714                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10715                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10716                 </links>
10717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10718             <actions>
10719                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10720                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10721                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10722                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10723             </actions>
10724         </permacrud>
10725         </class>
10726         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10727                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10728                         <field name="id" reporter:datatype="id" />
10729                         <field name="owner" reporter:datatype="link"/>
10730                         <field name="create_time" reporter:datatype="timestamp"/>
10731                         <field name="template" reporter:datatype="link"/>
10732                         <field name="data" reporter:datatype="text"/>
10733                         <field name="folder" reporter:datatype="link"/>
10734                         <field name="recur" reporter:datatype="bool"/>
10735                         <field name="recurrence" reporter:datatype="interval"/>
10736                         <field name="name" reporter:datatype="text"/>
10737                         <field name="description" reporter:datatype="text"/>
10738                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10739                 </fields>
10740                 <links>
10741                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10742                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10743                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10744                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10745                 </links>
10746         </class>
10747         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10748                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10749                         <field name="id" reporter:datatype="id" />
10750                         <field name="runner" reporter:datatype="link"/>
10751                         <field name="start_time" reporter:datatype="timestamp"/>
10752                         <field name="complete_time" reporter:datatype="timestamp"/>
10753                         <field name="run_time" reporter:datatype="timestamp"/>
10754                         <field name="email" reporter:datatype="text"/>
10755                         <field name="excel_format" reporter:datatype="bool"/>
10756                         <field name="csv_format" reporter:datatype="bool"/>
10757                         <field name="html_format" reporter:datatype="bool"/>
10758                         <field name="error_code" reporter:datatype="int"/>
10759                         <field name="error_text" reporter:datatype="text"/>
10760                         <field name="report" reporter:datatype="link"/>
10761                         <field name="folder" reporter:datatype="link"/>
10762                         <field name="chart_pie" reporter:datatype="bool"/>
10763                         <field name="chart_bar" reporter:datatype="bool"/>
10764                         <field name="chart_line" reporter:datatype="bool"/>
10765                 </fields>
10766                 <links>
10767                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10768                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10769                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10770                 </links>
10771         </class>
10772         <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">
10773                 <fields oils_persist:primary="id">
10774                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10775                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10776                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10777                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10778                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10779                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10780                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10781                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10782                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10783                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10784                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10785                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10786                 </fields>
10787                 <links>
10788                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10789                 </links>
10790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10791                         <actions>
10792                                 <retrieve />
10793                         </actions>
10794                 </permacrud>
10795         </class>
10796         <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">
10797                 <fields oils_persist:primary="id">
10798                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10799                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10800                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10801                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10802                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10803                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10804                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10805                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10806                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10807                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10808                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10809                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10810                 </fields>
10811                 <links>
10812                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10813                 </links>
10814         </class>
10815         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10816                 <fields oils_persist:primary="id">
10817                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10818                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10819                         <field reporter:label="Fingerprint" name="fingerprint" />
10820                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10821                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10822                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10823                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10824                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10825                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10826                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10827                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10828                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10829                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10830                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10831                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10832                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10833                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10834                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10835                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10836                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10837                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10838                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10839                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10840                 </fields>
10841                 <links>
10842                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10843                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10844                 </links>
10845         </class>
10846         <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">
10847                 <fields oils_persist:primary="id">
10848                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10849                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10850                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10851                 </fields>
10852                 <links>
10853                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10854                 </links>
10855         </class>
10856         <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">
10857                 <fields oils_persist:primary="id">
10858                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10859                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10860                 </fields>
10861                 <links>
10862                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10863                 </links>
10864         </class>
10865         <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
10866                 <fields oils_persist:primary="id">
10867                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10868                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10869                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10870                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10871                 </fields>
10872                 <links>
10873                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10874                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10875                 </links>
10876         </class>
10877         <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">
10878                 <fields oils_persist:primary="xact">
10879                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10880                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10881                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10882                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10883                 </fields>
10884                 <links>
10885                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10886                 </links>
10887         </class>
10888         <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">
10889                 <fields oils_persist:primary="xact">
10890                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10891                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
10892                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10893                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10894                 </fields>
10895                 <links>
10896                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10897                 </links>
10898         </class>
10899         <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)">
10900                 <fields oils_persist:primary="id">
10901                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10902                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10903                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10904                 </fields>
10905                 <links>
10906                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10907                 </links>
10908         </class>
10909         <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">
10910                 <fields oils_persist:primary="id">
10911                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10912                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10913                 </fields>
10914                 <links>
10915                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10916                 </links>
10917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10918                         <actions>
10919                                 <retrieve permission="STAFF_LOGIN">
10920                                         <context link="id" field="circ_lib"/>
10921                                 </retrieve>
10922                         </actions>
10923                 </permacrud>
10924         </class>
10925         <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">
10926                 <fields oils_persist:primary="bibid">
10927                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10928                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10929                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10930                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10931                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10932                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10933                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10934                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10935                 </fields>
10936                 <links>
10937                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10938                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10939                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10940                 </links>
10941         </class>
10942         <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">
10943                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10944                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10945                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10946                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10947                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10948                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10949                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10950                 </fields>
10951                 <links>
10952                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10953                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10954                 </links>
10955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10956                         <actions>
10957                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10958                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10959                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10960                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10961                         </actions>
10962                 </permacrud>
10963         </class>
10964         <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">
10965                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10966                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10967                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10968                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10969                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10970                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10971                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10972                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10973                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10974                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10975                 </fields>
10976                 <links>
10977                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10978                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10979                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10980                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10981                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10982                 </links>
10983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10984                         <actions>
10985                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10986                                         <context link="formula" field="owner"/>
10987                                 </create>
10988                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10989                                         <context link="formula" field="owner"/>
10990                                 </retrieve>
10991                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10992                                         <context link="formula" field="owner"/>
10993                                 </update>
10994                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10995                                         <context link="formula" field="owner"/>
10996                                 </delete>
10997                         </actions>
10998                 </permacrud>
10999         </class>
11000
11001         <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">
11002                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
11003                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11004                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11005                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11006                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
11007                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11008                 </fields>
11009                 <links>
11010                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11011                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
11012                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11013                 </links>
11014                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11015                         <actions>
11016                                 <create permission="CREATE_PURCHASE_ORDER">
11017                                         <context link="formula" field="owner"/>
11018                 </create>
11019                                 <retrieve permission="CREATE_PURCHASE_ORDER">
11020                                         <context link="formula" field="owner"/>
11021                 </retrieve>
11022                                 <update permission="CREATE_PURCHASE_ORDER">
11023                                         <context link="formula" field="owner"/>
11024                 </update>
11025                                 <delete permission="CREATE_PURCHASE_ORDER">
11026                                         <context link="formula" field="owner"/>
11027                 </delete>
11028                         </actions>
11029                 </permacrud>
11030         </class>
11031
11032         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
11033                 <fields oils_persist:primary="id">
11034                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
11035                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
11036                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
11037                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
11038                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
11039                 </fields>
11040                 <links>
11041                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
11042                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
11043                 </links>
11044         </class>
11045
11046         <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">
11047                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
11048                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11049                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11050                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11051                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11052                 </fields>
11053                 <links>
11054                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11055                 </links>
11056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11057                         <actions>
11058                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11059                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11060                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11061                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
11062                         </actions>
11063                 </permacrud>
11064         </class>
11065
11066         <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">
11067                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
11068                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
11069                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11070                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
11071                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11072                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
11073                 </fields>
11074                 <links>
11075                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11076                 </links>
11077                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11078                         <actions>
11079                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11080                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
11081                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11082                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
11083                         </actions>
11084                 </permacrud>
11085         </class>
11086
11087         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
11088                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
11089                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11090                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11091                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11092                 </fields>
11093                 <links>
11094                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11095                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11096                 </links>
11097         </class>
11098
11099         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
11100                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
11101                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11102                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11103                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11104                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11105                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11106                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11107                 </fields>
11108                 <links>
11109                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11110                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
11111                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11112                 </links>
11113         </class>
11114
11115         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
11116                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
11117                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
11118                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
11119                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
11120                 </fields>
11121                 <links>
11122                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
11123                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
11124                 </links>
11125         </class>
11126
11127         <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">
11128                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
11129                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
11130                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
11131                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
11132                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
11133                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11134                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
11135                 </fields>
11136                 <links>
11137                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
11138                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
11139                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11140                 </links>
11141         </class>
11142
11143         <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">
11144                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
11145                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
11146                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11147                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
11148                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11149                 </fields>
11150                 <links>
11151                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11152                 </links>
11153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11154             <actions>
11155                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11156                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
11157                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11158                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
11159             </actions>
11160                 </permacrud>
11161         </class>
11162
11163         <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">
11164                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
11165                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
11166                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
11167                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
11168                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
11169                 </fields>
11170                 <links>
11171                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
11172                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
11173                 </links>
11174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11175                         <actions>
11176                                 <create permission="ADMIN_CLAIM_POLICY">
11177                                         <context link="claim_policy" field="org_unit"/>
11178                 </create>
11179                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
11180                                         <context link="claim_policy" field="org_unit"/>
11181                 </retrieve>
11182                                 <update permission="ADMIN_CLAIM_POLICY">
11183                                         <context link="claim_policy" field="org_unit"/>
11184                 </update>
11185                                 <delete permission="ADMIN_CLAIM_POLICY">
11186                                         <context link="claim_policy" field="org_unit"/>
11187                 </delete>
11188                         </actions>
11189                 </permacrud>
11190         </class>
11191
11192     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
11193         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
11194             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11195             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
11196             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11197             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
11198             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
11199             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
11200             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
11201             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
11202             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
11203             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
11204             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
11205             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
11206             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
11207             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
11208             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11209             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
11210                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
11211                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
11212                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
11213         </fields>
11214         <links>
11215             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
11216             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11217         </links>
11218     </class>
11219
11220     <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">
11221         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
11222             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11223             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11224             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11225             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11226             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11227         </fields>
11228     </class>
11229
11230     <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">
11231         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11232             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11233             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11234             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11235             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11236             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11237             <field reporter:label="City" name="city" reporter:datatype="text"/>
11238             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11239             <field reporter:label="State" name="state" reporter:datatype="text"/>
11240             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11241             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11242             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11243         </fields>
11244     </class>
11245
11246     <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">
11247         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
11248             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11249             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11250             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11251             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
11252             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
11253             <field reporter:label="City" name="city" reporter:datatype="text"/>
11254             <field reporter:label="County" name="county"  reporter:datatype="text"/>
11255             <field reporter:label="State" name="state" reporter:datatype="text"/>
11256             <field reporter:label="Country" name="country" reporter:datatype="text"/>
11257             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
11258             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11259         </fields>
11260     </class>
11261
11262     <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">
11263         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
11264             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11265             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11266             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11267             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
11268             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
11269             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11270         </fields>
11271     </class>
11272
11273     <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">
11274         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
11275             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
11276             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
11277             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
11278             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
11279             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
11280             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
11281         </fields>
11282     </class>
11283
11284         <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">
11285                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
11286                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
11287                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11288                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
11289                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
11290                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
11291                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
11292                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
11293                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
11294                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11295                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11296                 </fields>
11297                 <links>
11298                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11299                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11300                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
11301                 </links>
11302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11303                         <actions>
11304                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11305                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11306                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11307                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
11308                         </actions>
11309                 </permacrud>
11310         </class>
11311
11312         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
11313                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
11314                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
11315                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
11316                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
11317                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
11318                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
11319                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
11320                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
11321                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
11322                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
11323                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
11324                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
11325                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
11326                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
11327                 </fields>
11328                 <links>
11329                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
11330                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11331                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11332                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
11333                 </links>
11334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11335                         <actions>
11336                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11337                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11338                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11339                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
11340                         </actions>
11341                 </permacrud>
11342         </class>
11343
11344         <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">
11345                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
11346                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
11347                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
11348                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
11349                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
11350                 </fields>
11351                 <links>
11352                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
11353                 </links>
11354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
11355                         <actions>
11356                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11357                     <context link="fieldset" field="owning_lib"/>
11358                 </create>
11359                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11360                     <context link="fieldset" field="owning_lib"/>
11361                 </retrieve>
11362                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11363                     <context link="fieldset" field="owning_lib"/>
11364                 </update>
11365                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
11366                     <context link="fieldset" field="owning_lib"/>
11367                 </delete>
11368                         </actions>
11369                 </permacrud>
11370         </class>
11371
11372     <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">
11373         <fields>
11374             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11375             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11376             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11377         </fields>
11378                 <links>
11379                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11380                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11381                 </links>
11382     </class>
11383
11384     <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">
11385         <fields>
11386             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11387             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
11388         </fields>
11389                 <links>
11390                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11391                 </links>
11392     </class>
11393
11394     <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">
11395         <fields>
11396             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11397             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11398             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11399         </fields>
11400                 <links>
11401                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11402                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11403                 </links>
11404     </class>
11405
11406     <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">
11407         <fields>
11408             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11409             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
11410         </fields>
11411                 <links>
11412                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11413                 </links>
11414     </class>
11415
11416     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
11417                 <oils_persist:source_definition><![CDATA[
11418
11419             SELECT  DISTINCT l.*
11420               FROM  action.unfulfilled_hold_loops l
11421                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
11422               WHERE l.count = m.max
11423
11424                 ]]></oils_persist:source_definition>
11425         <fields>
11426             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11427             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11428             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11429         </fields>
11430                 <links>
11431                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11432                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11433                 </links>
11434     </class>
11435
11436         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11437                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11438                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11439                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11440                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11441                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11442                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11443                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11444                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11445                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11446                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11447                 </fields>
11448                 <links>
11449                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11450                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11451                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11452                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11453                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11454                 </links>
11455         </class>
11456
11457         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11458                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11459                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11460                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11461                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11462                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11463                 </fields>
11464                 <links>
11465                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11466                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11467                 </links>
11468         </class>
11469
11470         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11471                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11472                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11473                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11474                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11475                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11476                 </fields>
11477                 <links>
11478                 </links>
11479         </class>
11480
11481         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11482                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11483                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11484                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11485                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11486                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11487                 </fields>
11488                 <links>
11489                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11490                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11491                 </links>
11492         </class>
11493         
11494         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11495                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11496                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11497                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11498                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11499                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11500                 </fields>
11501                 <links>
11502                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11503                 </links>
11504         </class>
11505         
11506         <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">
11507                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11508                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11509                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11510                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11511                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11512                 </fields>
11513                 <links>
11514                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11515                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11516                 </links>
11517         </class>
11518
11519         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11520                 <fields oils_persist:primary="name">
11521                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11522                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11523                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11524                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11525                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11526                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11527                 </fields>
11528                 <links>
11529                 </links>
11530         </class>
11531
11532         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11533                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11534                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11535                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11536                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11537                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11538                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11539                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11540                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11541                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11542                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11543                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11544                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11545                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11546                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11547                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11548                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11549                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11550                 </fields>
11551                 <links>
11552                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11553                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11554                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11555                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11556                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11557                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11558                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11559                 </links>
11560         </class>
11561
11562         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11563                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11564                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11565                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11566                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11567                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11568                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11569                 </fields>
11570                 <links>
11571                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11572                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11573                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11574                 </links>
11575         </class>
11576
11577         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11578                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11579                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11580                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11581                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11582                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11583                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11584                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11585                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11586                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11587                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11588                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11589                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11590                 </fields>
11591                 <links>
11592                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11593                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11594                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11595                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11596                 </links>
11597         </class>
11598
11599         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11600                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11601                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11602                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11603                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11604                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11605                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11606                 </fields>
11607                 <links>
11608                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11609                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11610                 </links>
11611         </class>
11612
11613         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11614                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11615                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11616                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11617                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11618                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11619                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11620                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11621                 </fields>
11622                 <links>
11623                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11624                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11625                 </links>
11626         </class>
11627
11628         <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">
11629                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11630                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11631                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11632                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11633                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11634                 </fields>
11635                 <links>
11636                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11637                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11638                 </links>
11639         </class>
11640
11641         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11642                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11643                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11644                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11645                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11646                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11647                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11648                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11649                 </fields>
11650                 <links>
11651                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11652                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11653                 </links>
11654         </class>
11655
11656         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11657                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11658                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11659                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11660                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11661                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11662                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11663                 </fields>
11664                 <links>
11665                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11666                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11667                 </links>
11668         </class>
11669
11670         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11671                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11672                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11673                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11674                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11675                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11676                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11677                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11678                 </fields>
11679                 <links>
11680                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11681                 </links>
11682         </class>
11683
11684         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11685                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11686                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11687                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11688                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11689                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11690                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11691                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11692                 </fields>
11693                 <links>
11694                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11695                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11696                 </links>
11697         </class>
11698
11699         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11700                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11701                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11702                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11703                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11704                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11705                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11706                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11707                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11708                 </fields>
11709                 <links>
11710                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11711                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11712                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11713                 </links>
11714         </class>
11715
11716         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11717                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11718                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11719                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11720                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11721                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11722                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11723                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11724                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11725                 </fields>
11726                 <links>
11727                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11728                 </links>
11729         </class>
11730
11731         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11732                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11733                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11734                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11735                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11736                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11737                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11738                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11739                 </fields>
11740                 <links>
11741                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11742                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11743                 </links>
11744         </class>
11745
11746         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11747                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11748                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11749                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11750                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11751                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11752                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11753                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11754                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11755                 </fields>
11756                 <links>
11757                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11758                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11759                 </links>
11760         </class>
11761
11762         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11763                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11764                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11765                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11766                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11767                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11768                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11769                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11770                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11771                 </fields>
11772                 <links>
11773                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11774                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11775                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11776                 </links>
11777         </class>
11778
11779         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11780                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11781                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11782                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11783                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11784                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11785                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11786                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11787                 </fields>
11788                 <links>
11789                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11790                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11791                 </links>
11792         </class>
11793
11794         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11795                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11796                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11797                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11798                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11799                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11800                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11801                 </fields>
11802                 <links>
11803                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11804                 </links>
11805         </class>
11806
11807         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11808                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11809                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11810                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11811                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11812                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11813                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11814                 </fields>
11815                 <links>
11816                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11817                 </links>
11818         </class>
11819
11820         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11821                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11822                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11823                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11824                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11825                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11826                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11827                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11828                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11829                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11830                 </fields>
11831                 <links>
11832                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11833                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11834                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11835                 </links>
11836         </class>
11837
11838         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11839                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11840                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11841                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11842                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11843                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11844                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11845                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11846                 </fields>
11847                 <links>
11848                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11849                 </links>
11850         </class>
11851
11852         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11853                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11854                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11855                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11856                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11857                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11858                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11859                 </fields>
11860                 <links>
11861                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11862                 </links>
11863         </class>
11864
11865         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11866                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11867                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11868                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11869                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11870                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11871                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11872                 </fields>
11873                 <links>
11874                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11875                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11876                 </links>
11877         </class>
11878
11879         <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">
11880                 <fields oils_persist:primary="id">
11881                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11882                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11883                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11884                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11885                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11886                 </fields>
11887                 <links>
11888                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11889                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11890                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11891                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11892                 </links>
11893         </class>
11894
11895         <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">
11896                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11897                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11898                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11899                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11900                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11901                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11902                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11903                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11904                 </fields>
11905                 <links/>
11906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11907                         <actions>
11908                                 <retrieve/>
11909                         </actions>
11910                 </permacrud>
11911         </class>
11912
11913         <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">
11914                 <fields oils_persist:primary="ptype_key">
11915                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11916                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11917                 </fields>
11918                 <links/>
11919                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11920                         <actions>
11921                                 <retrieve/>
11922                         </actions>
11923                 </permacrud>
11924         </class>
11925
11926         <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">
11927                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11928                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11929                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11930                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11931                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11932                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11933                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11934                 </fields>
11935                 <links>
11936                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11937                 </links>
11938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11939                         <actions>
11940                                 <retrieve/>
11941                         </actions>
11942                 </permacrud>
11943         </class>
11944
11945         <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">
11946                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11947                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11948                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11949                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11950                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11951                 </fields>
11952                 <links>
11953                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11954                 </links>
11955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11956                         <actions>
11957                                 <retrieve/>
11958                         </actions>
11959                 </permacrud>
11960         </class>
11961
11962     <class
11963         id="uvs"
11964         controller="open-ils.cstore open-ils.pcrud"
11965         oils_obj:fieldmapper="url_verify::session"
11966         oils_persist:tablename="url_verify.session"
11967         reporter:label="URL Verification Session"
11968     >
11969         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11970             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11971             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11972                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11973             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11974             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11975             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11976             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11977             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11978             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11979         </fields>
11980
11981         <links>
11982             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11983             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11984             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11985             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11986             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11987         </links>
11988
11989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11990             <actions>
11991                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11992             </actions>
11993         </permacrud>
11994
11995     </class>
11996
11997     <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">
11998         <oils_persist:source_definition><![CDATA[
11999             SELECT
12000                 cbrebi.id AS id,  -- so we can have a pkey in our view
12001                 uvs.id AS session,
12002                 uvs.owning_lib,
12003                 cbrebi.target_biblio_record_entry
12004             FROM url_verify.session uvs
12005             JOIN container.biblio_record_entry_bucket cbreb
12006                 ON (uvs.container = cbreb.id)
12007             JOIN container.biblio_record_entry_bucket_item cbrebi
12008                 ON (cbrebi.bucket = cbreb.id)
12009         ]]></oils_persist:source_definition>
12010         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
12011             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
12012             <field reporter:label="Session" name="session" reporter:datatype="link" />
12013             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
12014             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
12015         </fields>
12016         <links>
12017             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
12018             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
12019             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
12020         </links>
12021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12022             <actions>
12023                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
12024             </actions>
12025         </permacrud>
12026     </class>
12027
12028     <class
12029         id="uvus"
12030         controller="open-ils.cstore open-ils.pcrud"
12031         oils_obj:fieldmapper="url_verify::url_selector"
12032         oils_persist:tablename="url_verify.url_selector"
12033         reporter:label="URL Verification URL Selector"
12034     >
12035         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
12036             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
12037             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
12038                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12039             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
12040         </fields>
12041
12042         <links>
12043             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12044             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
12045         </links>
12046
12047         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12048             <actions>
12049                 <create permission="URL_VERIFY">
12050                     <context link="session" field="owning_lib"/>
12051                 </create>
12052                 <retrieve permission="URL_VERIFY">
12053                     <context link="session" field="owning_lib"/>
12054                 </retrieve>
12055                 <update permission="URL_VERIFY">
12056                     <context link="session" field="owning_lib"/>
12057                 </update>
12058                 <delete permission="URL_VERIFY">
12059                     <context link="session" field="owning_lib"/>
12060                 </delete>
12061             </actions>
12062         </permacrud>
12063
12064     </class>
12065
12066     <class
12067         id="uvu"
12068         controller="open-ils.cstore open-ils.pcrud"
12069         oils_obj:fieldmapper="url_verify::url"
12070         oils_persist:tablename="url_verify.url"
12071         reporter:label="URL Verification URL"
12072     >
12073         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
12074             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
12075                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
12076                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
12077                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
12078                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
12079             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
12080             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
12081             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
12082             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
12083             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
12084             <field reporter:label="Host" name="host" reporter:datatype="text"/>
12085             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
12086             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
12087             <field reporter:label="Path" name="path" reporter:datatype="text"/>
12088             <field reporter:label="Page" name="page" reporter:datatype="text"/>
12089             <field reporter:label="Query" name="query" reporter:datatype="text"/>
12090             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
12091             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
12092         </fields>
12093
12094         <links>
12095             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
12096             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
12097             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12098             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
12099             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
12100         </links>
12101
12102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12103             <actions>
12104                 <create permission="URL_VERIFY">
12105                     <context link="session" field="owning_lib"/>
12106                 </create>
12107                 <retrieve permission="URL_VERIFY">
12108                     <context link="session" field="owning_lib"/>
12109                 </retrieve>
12110                 <update permission="URL_VERIFY">
12111                     <context link="session" field="owning_lib"/>
12112                 </update>
12113                 <delete permission="URL_VERIFY">
12114                     <context link="session" field="owning_lib"/>
12115                 </delete>
12116             </actions>
12117         </permacrud>
12118
12119     </class>
12120
12121     <class
12122         id="uvva"
12123         controller="open-ils.cstore open-ils.pcrud"
12124         oils_obj:fieldmapper="url_verify::verification_attempt"
12125         oils_persist:tablename="url_verify.verification_attempt"
12126         reporter:label="URL Verification Attempt"
12127     >
12128         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
12129             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
12130                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
12131                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
12132             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
12133             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
12134         </fields>
12135
12136         <links>
12137             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
12138             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12139         </links>
12140
12141         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12142             <actions>
12143                 <create permission="URL_VERIFY">
12144                     <context link="session" field="owning_lib"/>
12145                 </create>
12146                 <retrieve permission="URL_VERIFY">
12147                     <context link="session" field="owning_lib"/>
12148                 </retrieve>
12149                 <update permission="URL_VERIFY">
12150                     <context link="session" field="owning_lib"/>
12151                 </update>
12152                 <delete permission="URL_VERIFY">
12153                     <context link="session" field="owning_lib"/>
12154                 </delete>
12155             </actions>
12156         </permacrud>
12157
12158     </class>
12159
12160     <class
12161         id="uvuv"
12162         controller="open-ils.cstore open-ils.pcrud"
12163         oils_obj:fieldmapper="url_verify::url_verification"
12164         oils_persist:tablename="url_verify.url_verification"
12165         reporter:label="URL Verification"
12166     >
12167         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
12168             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
12169                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
12170                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
12171             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
12172             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
12173             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
12174             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
12175                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
12176         </fields>
12177
12178         <links>
12179             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
12180             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
12181             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
12182         </links>
12183
12184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12185             <actions>
12186                 <create permission="URL_VERIFY">
12187                     <context link="attempt" jump="session" field="owning_lib"/>
12188                 </create>
12189                 <retrieve permission="URL_VERIFY">
12190                     <context link="attempt" jump="session" field="owning_lib"/>
12191                 </retrieve>
12192                 <update permission="URL_VERIFY">
12193                     <context link="attempt" jump="session" field="owning_lib"/>
12194                 </update>
12195                 <delete permission="URL_VERIFY">
12196                     <context link="attempt" jump="session" field="owning_lib"/>
12197                 </delete>
12198             </actions>
12199         </permacrud>
12200
12201     </class>
12202
12203         <class
12204                 id="cfdi"
12205                 controller="open-ils.cstore open-ils.pcrud"
12206                 oils_obj:fieldmapper="config::filter_dialog_interface"
12207                 oils_persist:tablename="config.filter_dialog_interface"
12208                 reporter:label="FilterDialog Interface">
12209                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
12210                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
12211                         <field reporter:label="Description" name="description" reporter:datatype="text" />
12212                 </fields>
12213                 <links>
12214                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
12215                 </links>
12216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12217                         <actions>
12218                                 <retrieve />
12219                         </actions>
12220                 </permacrud>
12221         </class>
12222
12223         <class
12224                 id="cfdfs"
12225                 controller="open-ils.cstore open-ils.pcrud"
12226                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
12227                 oils_persist:tablename="config.filter_dialog_filter_set"
12228                 reporter:label="FilterDialog Filter Set">
12229                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
12230                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12231                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12232                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12233                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12234                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
12235                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
12236                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
12237                 </fields>
12238                 <links>
12239                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12240                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12241                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
12242                 </links>
12243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12244                         <actions>
12245                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12246                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12247                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12248                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
12249                         </actions>
12250                 </permacrud>
12251
12252         </class>
12253
12254         <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">
12255                 <fields oils_persist:primary="code">
12256                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
12257                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
12258                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
12259                 </fields>
12260                 <links/>
12261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12262                         <actions>
12263                                 <retrieve/>
12264                         </actions>
12265                 </permacrud>
12266         </class>
12267
12268         <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">
12269                 <oils_persist:source_definition><![CDATA[
12270
12271             SELECT  b.id,
12272                     MAX(dcp.edit_date) AS last_delete_date
12273              FROM   biblio.record_entry b
12274                     JOIN asset.call_number cn ON (cn.record = b.id)
12275                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
12276              WHERE  NOT b.deleted
12277              GROUP BY b.id
12278              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
12279
12280                 ]]></oils_persist:source_definition>
12281                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12282                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12283                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
12284                 </fields>
12285                 <links>
12286                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12287                 </links>
12288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12289                         <actions>
12290                                 <retrieve/>
12291                         </actions>
12292                 </permacrud>
12293         </class>
12294
12295         <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">
12296                 <fields oils_persist:primary="id">
12297                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12298                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12299                 </fields>
12300                 <links/>
12301                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12302                         <actions>
12303                                 <retrieve/>
12304                         </actions>
12305                 </permacrud>
12306         </class>
12307
12308         <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">
12309                 <fields oils_persist:primary="id">
12310                         <field reporter:label="State ID" reporter:selector="label" name="id" reporter:datatype="text"/>
12311                         <field reporter:label="State Label" name="label" oils_persist:i18n="true" reporter:datatype="text"/>
12312                 </fields>
12313                 <links/>
12314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12315                         <actions>
12316                                 <retrieve/>
12317                         </actions>
12318                 </permacrud>
12319         </class>
12320
12321
12322         <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">
12323                 <oils_persist:source_definition><![CDATA[
12324
12325             -- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.
12326             -- -- If we expect to use pcrud to query against specific bibs, we probably want to do this.  However, if we're using this to populate a report, we
12327             -- -- may not.
12328             -- SELECT
12329             --     bre.id AS bib_id,
12330             --     COALESCE( z.copy_count, 0 ) AS copy_count,
12331             --     COALESCE( z.hold_count, 0 ) AS hold_count,
12332             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
12333             -- FROM (
12334                 SELECT
12335                     y.bre AS id,
12336                     COALESCE( x.copy_count, 0 ) AS copy_count,
12337                     y.hold_count AS hold_count,
12338                     (y.hold_count::REAL / (CASE WHEN x.copy_count = 0 OR x.copy_count IS NULL THEN 0.1 ELSE x.copy_count::REAL END)) AS hold_copy_ratio
12339                 FROM (
12340                         SELECT
12341                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
12342                             COUNT(*) AS hold_count
12343                         FROM action.hold_request h
12344                         WHERE
12345                             cancel_time IS NULL
12346                             AND fulfillment_time IS NULL
12347                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
12348                         GROUP BY 1
12349                     )y LEFT JOIN (
12350                         SELECT 
12351                             (SELECT id
12352                                 FROM biblio.record_entry 
12353                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
12354                             ) AS bre, 
12355                             COUNT(*) AS copy_count
12356                         FROM asset.copy
12357                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
12358                         WHERE copy.holdable 
12359                             AND NOT copy.deleted 
12360                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
12361                         GROUP BY 1
12362                     )x ON x.bre = y.bre
12363                 -- )z RIGHT JOIN (
12364                 --     SELECT id
12365                 --     FROM biblio.record_entry
12366                 --     WHERE NOT deleted
12367                 -- )bre ON (z.bib_id = bre.id)
12368                 
12369
12370                 ]]></oils_persist:source_definition>
12371                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12372                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
12373                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
12374                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
12375                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
12376                 </fields>
12377                 <links>
12378                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12379                 </links>
12380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12381                         <actions>
12382                                 <retrieve/>
12383                         </actions>
12384                 </permacrud>
12385         </class>
12386
12387         <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">
12388                 <oils_persist:source_definition><![CDATA[
12389             SELECT *,
12390                 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,
12391                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
12392             FROM
12393                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
12394                     FROM
12395                         action.hold_request ahr
12396                         JOIN reporter.hold_request_record rhrr USING (id)
12397                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12398                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
12399                     WHERE
12400                         ahr.cancel_time IS NULL
12401                         AND ahr.fulfillment_time IS NULL
12402                     GROUP BY bib_record, pickup_lib
12403                 )x
12404                 JOIN
12405                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12406                     FROM
12407                         action.hold_request ahr
12408                         JOIN reporter.hold_request_record rhrr USING (id)
12409                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12410                     WHERE
12411                         ahr.cancel_time IS NULL
12412                         AND ahr.fulfillment_time IS NULL
12413                     GROUP BY bib_record
12414                 )y
12415                 USING (id)
12416                 ]]></oils_persist:source_definition>
12417                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12418                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12419                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
12420                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
12421                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
12422                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12423                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12424                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
12425                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12426                 </fields>
12427                 <links>
12428                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12429                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
12430                 </links>
12431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12432                         <actions>
12433                                 <retrieve/>
12434                         </actions>
12435                 </permacrud>
12436         </class>
12437
12438         <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) ">
12439                 <oils_persist:source_definition><![CDATA[
12440             WITH counts_at_ou AS (
12441                 SELECT  rhrr.bib_record AS id,
12442                         aou.id AS pickup_lib_or_desc,
12443                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
12444                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
12445                   FROM  actor.org_unit aou
12446                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
12447                         action.hold_request ahr
12448                         JOIN reporter.hold_request_record rhrr USING (id)
12449                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12450                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12451                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12452                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12453                         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
12454                   GROUP BY 1, 2
12455             )
12456             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12457                    y.holds_everywhere, y.copy_count_everywhere,
12458                 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,
12459                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
12460             FROM counts_at_ou x
12461                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12462                     FROM
12463                         action.hold_request ahr
12464                         JOIN reporter.hold_request_record rhrr USING (id)
12465                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12466                     WHERE
12467                         ahr.cancel_time IS NULL
12468                         AND ahr.fulfillment_time IS NULL
12469                     GROUP BY bib_record
12470                 )y
12471                 USING (id)
12472                 ]]></oils_persist:source_definition>
12473                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12474                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12475                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12476                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12477                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12478                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12479                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12480                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12481                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12482                 </fields>
12483                 <links>
12484                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12485                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12486                 </links>
12487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12488                         <actions>
12489                                 <retrieve/>
12490                         </actions>
12491                 </permacrud>
12492         </class>
12493
12494         <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">
12495                 <oils_persist:source_definition><![CDATA[
12496             SELECT
12497                 ac.id,
12498                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12499                 MAX(actac.xact_start) AS last_circ
12500             FROM asset.copy ac
12501                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12502             GROUP BY ac.id
12503
12504             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12505             --SELECT
12506             --    ac.id,
12507             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12508             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12509             --FROM asset.copy ac
12510             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12511             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12512             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12513                 ]]></oils_persist:source_definition>
12514                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12515                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12516                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12517                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12518                 </fields>
12519                 <links>
12520                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12521                 </links>
12522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12523                         <actions>
12524                                 <retrieve/>
12525                         </actions>
12526                 </permacrud>
12527         </class>
12528
12529         <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">
12530                 <fields oils_persist:primary="id">
12531                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12532                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12533                 </fields>
12534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12535                         <actions>
12536                                 <retrieve/>
12537                         </actions>
12538                 </permacrud>
12539         </class>
12540
12541         <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">
12542                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12543                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12544                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12545                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12546                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12547                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12548                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12549                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12550                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12551                 </fields>
12552                 <links>
12553                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12554                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12555                 </links>
12556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12557                         <actions>
12558                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12559                                 <retrieve/>
12560                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12561                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12562                         </actions>
12563                 </permacrud>
12564         </class>
12565
12566         <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">
12567                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12568                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12569                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12570                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12571                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12572                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12573                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12574                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12575                 </fields>
12576                 <links>
12577                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12578                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12579                 </links>
12580                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12581                         <actions>
12582                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12583                                 <retrieve/>
12584                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12585                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12586                         </actions>
12587                 </permacrud>
12588         </class>
12589
12590
12591         <!-- ********************************************************************************************************************* -->
12592         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12593         <!-- ********************************************************************************************************************* -->
12594         <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">
12595                 <fields oils_persist:primary="id">
12596                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12597                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12598                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12599                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12600                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12601                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12602                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12603                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12604                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12605                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12606                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12607                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12608                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12609                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12610                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12611                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12612                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12613                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12614                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12615                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12616                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12617                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12618                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12619                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12620                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12621                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12622                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12623                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12624                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12625                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12626                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12627                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12628                 </fields>
12629                 <links>
12630                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12631                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12632                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12633                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12634                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12635                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12636                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12637                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12638                 </links>
12639         </class>
12640
12641         <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">
12642                 <fields oils_persist:primary="id">
12643                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12644                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12645                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12646                 </fields>
12647                 <links>
12648                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12649                 </links>
12650         </class>
12651
12652         <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">
12653                 <fields oils_persist:primary="id">
12654                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12655                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12656                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12657                 </fields>
12658                 <links>
12659                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12660                 </links>
12661         </class>
12662
12663         <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">
12664                 <fields oils_persist:primary="id">
12665                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12666
12667                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12668                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12669                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12670
12671                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12672                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12673                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12674
12675                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12676                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12677
12678                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12679                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12680                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12681
12682                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12683                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12684
12685                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12686                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12687                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12688
12689                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12690                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12691                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12692
12693                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12694                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12695                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12696                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12697
12698                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12699                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12700
12701                 </fields>
12702                 <links>
12703                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12704                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12705                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12706                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12707                 </links>
12708         </class>
12709
12710         <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">
12711                 <oils_persist:source_definition><![CDATA[
12712
12713             SELECT
12714                 po.ordering_agency AS ordering_agency,
12715                 po.id AS purchase_order,
12716                 li.id AS lineitem,
12717                 lid.id AS lineitem_detail,
12718                 cpa.id AS claim_policy_action
12719             FROM
12720                 acq.lineitem_detail lid
12721                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12722                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12723                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12724                 JOIN acq.claim_policy_action cpa ON (
12725                     cpa.claim_policy = cp.id
12726
12727                     -- we only care about claim policy actions whose claim
12728                     -- interval we'd reached or exceeded
12729                     AND (NOW() - cpa.action_interval) > po.order_date
12730
12731                     -- filter out all claim policy actions where claim events
12732                     -- have occurred on or after the action's action_interval
12733                     AND NOT EXISTS (
12734                         SELECT 1
12735                         FROM
12736                             acq.claim_event evt
12737                             JOIN acq.claim claim ON (
12738                                 claim.id = evt.claim
12739                                 AND claim.lineitem_detail = lid.id
12740                             )
12741                         WHERE
12742                             evt.event_date >= (po.order_date + cpa.action_interval)
12743                     )
12744                 )
12745             WHERE
12746                 lid.cancel_reason IS NULL
12747                 AND li.cancel_reason IS NULL -- belt/suspenders
12748                 AND po.cancel_reason IS NULL -- belt/suspenders
12749                 AND lid.recv_time IS NULL
12750                 AND po.state = 'on-order'
12751             ORDER BY 1, 2, 3, 4, 5
12752
12753                 ]]></oils_persist:source_definition>
12754                 <fields>
12755                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12756                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12757                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12758                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12759                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12760                 </fields>
12761                 <links>
12762                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12763                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12764                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12765                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12766                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12767                 </links>
12768         </class>
12769         <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">
12770                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12771                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12772                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12773                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12774                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12775                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12776                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12777                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12778                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12779                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12780                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12781                 </fields>
12782                 <links>
12783                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12784                 </links>
12785     </class>
12786         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12787                 <oils_persist:source_definition><![CDATA[
12788             SELECT * FROM acq.lineitem_summary 
12789                                 WHERE item_count > (invoice_count + cancel_count)
12790         ]]></oils_persist:source_definition>
12791                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12792                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12793                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12794                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12795                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12796                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12797                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12798                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12799                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12800                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12801                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12802                 </fields>
12803                 <links>
12804                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12805                 </links>
12806     </class>
12807         <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">
12808                 <oils_persist:source_definition><![CDATA[
12809
12810                         SELECT  t.*
12811                           FROM  action.transit_copy t
12812                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12813                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12814                           WHERE s.parent_ou <> d.parent_ou
12815
12816                 ]]></oils_persist:source_definition>
12817                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12818                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12819                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12820                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12821                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12822                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12823                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12824                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12825                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12826                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12827                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12828                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12829                 </fields>
12830                 <links>
12831                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12832                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12833                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12834                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12835                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12836                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12837                 </links>
12838         </class>
12839
12840     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12841                 <oils_persist:source_definition><![CDATA[
12842
12843         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12844                 SELECT
12845                         cp.id as copy,
12846                         COUNT(circ.id),
12847                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12848                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12849                 FROM
12850                         asset.copy cp
12851                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12852                 GROUP BY 1, 3, 4
12853                 UNION ALL
12854                 SELECT
12855                         cp.id as copy,
12856                         COUNT(circ.id),
12857                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12858                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12859                 FROM
12860                         asset.copy cp
12861                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12862                 GROUP BY 1, 3, 4
12863                 UNION ALL
12864                 SELECT
12865                         id as copy,
12866                         circ_count,
12867                         -1 AS year,
12868                         false as is_renewal
12869                 FROM
12870                         extend_reporter.legacy_circ_count
12871         )x GROUP BY 1, 3, 4
12872
12873                 ]]></oils_persist:source_definition>
12874         <fields>
12875             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12876             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12877             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12878             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12879         </fields>
12880                 <links>
12881                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12882                 </links>
12883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12884                         <actions>
12885                                 <retrieve/>
12886                         </actions>
12887                 </permacrud>
12888     </class>
12889
12890         <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">
12891                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12892                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12893                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12894                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12895                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12896                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12897                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12898                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12899                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12900                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12901                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12902                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12903                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12904                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12905                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12906                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12907                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12908                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12909                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12910                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12911                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12912                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12913                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12914                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12915                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12916                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12917                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12918                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12919                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12920                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12921                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12922                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
12923                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
12924                 </fields>
12925                 <links>
12926                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12927                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12928                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12929                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12930                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12931                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12932                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12933                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12934                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12935                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12936                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12937                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12938                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12939                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12940                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12941                 </links>
12942         </class>
12943
12944     <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">
12945         <fields oils_persist:primary="id">
12946             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12947             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12948             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12949             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12950             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12951             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12952             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12953             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12954             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12955             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12956             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12957             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12958             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12959             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12960             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12961             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12962             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12963             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12964             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12965             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12966             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12967             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12968             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12969             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12970             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12971             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12972             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12973             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12974             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12975             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12976             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12977             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12978             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12979             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12980         </fields>
12981         <links>
12982             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12983             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12984             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12985             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12986             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12987             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12988             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12989             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12990         </links>
12991     </class>
12992
12993     <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">
12994         <fields oils_persist:primary="id">
12995             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12996             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12997             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12998             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12999         </fields>
13000         <links>
13001             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13002             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13003         </links>
13004     </class>
13005
13006     <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">
13007         <fields oils_persist:primary="owning_lib">
13008             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13009             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13010             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13011         </fields>
13012         <links>
13013             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13014         </links>
13015     </class>
13016
13017     <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">
13018         <fields oils_persist:primary="id">
13019             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13020             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13021             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13022             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13023             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13024         </fields>
13025         <links>
13026             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13027             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13028             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13029         </links>
13030     </class>
13031
13032     <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">
13033         <fields oils_persist:primary="circ_lib">
13034             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
13035             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13036             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13037             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13038         </fields>
13039         <links>
13040             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13041             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
13042         </links>
13043     </class>
13044
13045     <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">
13046         <fields oils_persist:primary="id">
13047             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
13048             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13049             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13050             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
13051             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
13052         </fields>
13053         <links>
13054             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
13055             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13056             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13057         </links>
13058     </class>
13059
13060     <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">
13061         <fields oils_persist:primary="home_ou">
13062             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
13063             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
13064             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
13065             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
13066         </fields>
13067         <links>
13068             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
13069             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
13070         </links>
13071     </class>
13072         <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">
13073                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
13074                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
13075                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13076                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13077                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
13078                 </fields>
13079                 <links>
13080                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13081                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
13082                 </links>
13083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13084                         <actions>
13085                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13086                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
13087                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13088                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
13089                         </actions>
13090                 </permacrud>
13091         </class>
13092         <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">
13093                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
13094                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
13095                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
13096                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
13097                 </fields>
13098                 <links>
13099                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
13100                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
13101                         </links>
13102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13103                 <actions>
13104                                 <create permission="ADMIN_ACQ_FUND_TAG">
13105                                         <context link="tag" field="owner"/>
13106                                 </create>
13107                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
13108                                         <context link="tag" field="owner"/>
13109                                 </retrieve>
13110                                 <update permission="ADMIN_ACQ_FUND_TAG">
13111                                         <context link="tag" field="owner"/>
13112                                 </update>
13113                                 <delete permission="ADMIN_ACQ_FUND_TAG">
13114                                         <context link="tag" field="owner"/>
13115                                 </delete>
13116                         </actions>
13117                 </permacrud>
13118         </class>
13119         <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">
13120                 <oils_persist:source_definition><![CDATA[
13121                 SELECT
13122                         poi.purchase_order AS purchase_order,
13123                         ii.invoice AS invoice,
13124                         NULL AS lineitem,
13125                         poi.id AS po_item,
13126                         NULL AS picklist
13127                 FROM
13128                         acq.po_item poi
13129                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
13130                 UNION SELECT
13131                         jub.purchase_order AS purchase_order,
13132                         ie.invoice AS invoice,
13133                         jub.id AS lineitem,
13134                         NULL AS po_item,
13135                         jub.picklist AS picklist
13136                 FROM
13137                         acq.lineitem jub
13138                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
13139                 UNION SELECT
13140                         ii.purchase_order AS purchase_order,
13141                         ii.invoice AS invoice,
13142                         NULL AS lineitem,
13143                         NULL AS po_item,
13144                         NULL AS picklist
13145                 FROM
13146                         acq.invoice_item ii
13147                 WHERE ii.po_item IS NULL
13148                 UNION SELECT
13149                         ie.purchase_order AS purchase_order,
13150                         ie.invoice AS invoice,
13151                         NULL AS lineitem,
13152                         NULL AS po_item,
13153                         NULL AS picklist
13154                 FROM
13155                         acq.invoice_entry ie
13156                 WHERE ie.lineitem IS NULL
13157                 UNION SELECT
13158                         NULL AS purchase_order,
13159                         NULL AS invoice,
13160                         jub.id AS lineitem,
13161                         NULL AS po_item,
13162                         jub.picklist AS picklist
13163                 FROM
13164                         acq.lineitem jub
13165                 WHERE jub.purchase_order IS NULL
13166                 ]]></oils_persist:source_definition>
13167                 <fields>
13168                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
13169                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
13170                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
13171                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
13172                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
13173                 </fields>
13174                 <links>
13175                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
13176                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
13177                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
13178                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
13179                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
13180                 </links>
13181         </class>
13182         <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">
13183                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
13184                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13185                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13186                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
13187                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
13188                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
13189                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
13190                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
13191                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
13192                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
13193                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
13194                 </fields>
13195                 <links>
13196                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13197                 </links>
13198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13199                         <actions>
13200                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13201                                 <retrieve/>
13202                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13203                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
13204                         </actions>
13205                 </permacrud>
13206         </class>
13207
13208         <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">
13209                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
13210                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13211                         <field name="date_applied" reporter:datatype="timestamp"/>
13212                         <field name="org" reporter:datatype="org_unit"/>
13213                         <field name="original_value" reporter:datatype="text"/>
13214                         <field name="new_value" reporter:datatype="text"/>
13215                         <field name="field_name" reporter:datatype="link"/>
13216                 </fields>
13217                 <links>
13218                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
13219                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
13220                 </links>
13221         </class>
13222         <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">
13223                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13224                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13225                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13226                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13227                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13228                 </fields>
13229                 <links>
13230                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13231                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
13232                 </links>
13233         </class>
13234         <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">
13235                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
13236                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13237                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
13238                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
13239                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
13240                 </fields>
13241                 <links>
13242                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
13243                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
13244                 </links>
13245         </class>
13246         <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">
13247                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
13248                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
13249                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
13250                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
13251                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
13252                 </fields>
13253                 <links>
13254                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
13255                 </links>
13256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13257                         <actions>
13258                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13259                                 <retrieve/>
13260                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13261                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13262                         </actions>
13263                 </permacrud>
13264         </class>
13265         <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">
13266                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
13267                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13268                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
13269                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
13270                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
13271                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
13272                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
13273                 </fields>
13274                 <links>
13275                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
13276                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
13277                 </links>
13278                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13279                         <actions>
13280                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13281                                 <retrieve/>
13282                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13283                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
13284                         </actions>
13285                 </permacrud>
13286         </class>
13287         <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">
13288                 <fields oils_persist:primary="code">
13289                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
13290                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
13291                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13292                 </fields>
13293                 <links>
13294                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13295                 </links>
13296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13297                         <actions>
13298                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13299                                 <retrieve/>
13300                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13301                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
13302                         </actions>
13303                 </permacrud>
13304         </class>
13305         <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">
13306                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
13307                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13308                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
13309                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
13310                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13311                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
13312                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
13313                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
13314                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
13315                 </fields>
13316                 <links>
13317                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
13318                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13319                 </links>
13320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13321                         <actions>
13322                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
13323                                 <retrieve/>
13324                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
13325                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
13326                         </actions>
13327                 </permacrud>
13328         </class>
13329         <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">
13330                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
13331                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
13332                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
13333                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
13334                 </fields>
13335                 <links>
13336                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
13337                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
13338                 </links>
13339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13340                         <actions>
13341                                 <create permission="UPDATE_COPY">
13342                     <context link="copy" field="circ_lib"/>
13343                 </create>
13344                                 <retrieve/>
13345                                 <update permission="UPDATE_COPY">
13346                     <context link="copy" field="circ_lib"/>
13347                 </update>
13348                                 <delete permission="UPDATE_COPY">
13349                     <context link="copy" field="circ_lib"/>
13350                 </delete>
13351                         </actions>
13352                 </permacrud>
13353         </class>
13354         <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">
13355         <oils_persist:source_definition><![CDATA[
13356         SELECT ahcm.target_copy AS id,count(*) AS count
13357          FROM
13358          action.hold_request ahr,
13359          action.hold_copy_map ahcm
13360          WHERE
13361          ahr.cancel_time IS NULL AND
13362          ahr.fulfillment_time IS NULL AND
13363          ahr.capture_time IS NULL AND
13364          ahr.id = ahcm.hold
13365          GROUP BY ahcm.target_copy
13366         ]]></oils_persist:source_definition>
13367         <fields oils_persist:primary="id">
13368             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
13369             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
13370         </fields>
13371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13372             <actions>
13373                <retrieve/>
13374             </actions>
13375         </permacrud>
13376         </class>
13377
13378         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
13379                 oils_obj:fieldmapper="config::workstation_setting_type" 
13380                 oils_persist:tablename="config.workstation_setting_type" 
13381                 reporter:label="Workstation Setting Type">
13382                 <fields oils_persist:primary="name">
13383                         <field name="name" reporter:datatype="text"/>
13384                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
13385                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
13386                         <field name="datatype" reporter:datatype="text"/>
13387                         <field name="fm_class" reporter:datatype="text"/>
13388                         <field name="grp" reporter:datatype="link"/>
13389                 </fields>
13390                 <links>
13391                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
13392                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
13393                 </links>
13394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13395                         <actions>
13396                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13397                                 <retrieve/>
13398                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13399                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
13400                         </actions>
13401                 </permacrud>
13402         </class>
13403
13404         <!-- no pcrud access is granted for now, because it's assumed these
13405                          setting values will be applied and retrived via the API. -->
13406         <class id="awss" 
13407                 controller="open-ils.cstore"
13408                 oils_obj:fieldmapper="actor::workstation_setting" 
13409                 oils_persist:tablename="actor.workstation_setting" 
13410                 reporter:label="Workstation Setting">
13411                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
13412                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
13413                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
13414                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
13415                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
13416                 </fields>
13417                 <links>
13418                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
13419                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
13420                 </links>
13421         </class>
13422
13423         <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">
13424         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
13425                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
13426                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
13427                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
13428         </fields>
13429         </class>
13430
13431         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
13432                 oils_obj:fieldmapper="config::print_template" 
13433                 oils_persist:tablename="config.print_template" 
13434                 reporter:label="Print Templates">
13435                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
13436                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
13437                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
13438                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
13439                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
13440                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13441                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
13442                         <field name="content_type" reporter:datatype="text"/>
13443                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13444                 </fields>
13445                 <links>
13446                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13447                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13448                 </links>
13449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13450                         <actions>
13451                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13452                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13453                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13454                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13455                         </actions>
13456                 </permacrud>
13457         </class>
13458
13459         <class id="cct" 
13460                 controller="open-ils.cstore open-ils.pcrud"
13461                 oils_obj:fieldmapper="config::carousel_type" 
13462                 oils_persist:tablename="config.carousel_type" 
13463                 reporter:label="Carousel Types">
13464                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13465                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13466                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13467                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13468                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13469                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13470                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13471                 </fields>
13472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13473                         <actions>
13474                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13475                                 <retrieve/>
13476                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13477                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13478                         </actions>
13479                 </permacrud>
13480         </class>
13481
13482         <class id="cc" 
13483                 controller="open-ils.cstore open-ils.pcrud"
13484                 oils_obj:fieldmapper="container::carousel" 
13485                 oils_persist:tablename="container.carousel" 
13486                 reporter:label="Carousels">
13487                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13488                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13489                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13490                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13491                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13492                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13493                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13494                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13495                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13496                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13497                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13498                         <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 -->
13499                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13500                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13501                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13502                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13503                 </fields>
13504                 <links>
13505                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13506                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13507                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13508                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13509                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13510                 </links>
13511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13512                         <actions>
13513                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13514                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13515                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13516                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13517                         </actions>
13518                 </permacrud>
13519         </class>
13520
13521         <class id="ccou" 
13522                 controller="open-ils.cstore open-ils.pcrud"
13523                 oils_obj:fieldmapper="container::carousel_org_unit" 
13524                 oils_persist:tablename="container.carousel_org_unit" 
13525                 reporter:label="Carousels Visible at Library">
13526                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13527                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13528                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13529                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13530                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13531                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13532                 </fields>
13533                 <links>
13534                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13535                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13536                 </links>
13537                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13538                         <actions>
13539                                 <create permission="ADMIN_CAROUSEL">
13540                                     <context link="carousel" field="owner" />
13541                                 </create>
13542                                 <retrieve permission="ADMIN_CAROUSEL">
13543                                     <context link="carousel" field="owner" />
13544                                 </retrieve>
13545                                 <update permission="ADMIN_CAROUSEL">
13546                                     <context link="carousel" field="owner" />
13547                                 </update>
13548                                 <delete permission="ADMIN_CAROUSEL">
13549                                     <context link="carousel" field="owner" />
13550                                 </delete>
13551                         </actions>
13552                 </permacrud>
13553         </class>
13554
13555         <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">
13556                 <fields oils_persist:primary="name">
13557                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13558                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13559                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13560                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13561                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13562                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13563                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13564                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13565                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13566                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13567                 </fields>
13568                 <links>
13569                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13570                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13571                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13572                 </links>
13573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13574                         <actions>
13575                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13576                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13577                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13578                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13579                         </actions>
13580                 </permacrud>
13581         </class>
13582         <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">
13583                 <fields oils_persist:primary="id" oils_persist:sequence="config.geolocation_service_id_seq">
13584                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
13585                         <field reporter:label="Active" name="active" reporter:datatype="bool" oils_obj:required="true"/>
13586                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13587                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true" reporter:label="Name"/>
13588                         <field reporter:label="Service Code" name="service_code" reporter:datatype="text"/>
13589                         <field reporter:label="API Key" name="api_key" reporter:datatype="text"/>
13590                 </fields>
13591                 <links>
13592                         <link field="owner" reltype="has_a" key="id" class="aou"/>
13593                 </links>
13594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13595                         <actions>
13596                                 <create permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13597                                 <retrieve permission="VIEW_GEOLOCATION_SERVICES" global_required="true"/>
13598                                 <update permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13599                                 <delete permission="ADMIN_GEOLOCATION_SERVICES" global_required="true"/>
13600                         </actions>
13601                 </permacrud>
13602         </class>
13603
13604         <!-- ********************************************************************************************************************* -->
13605 </IDL>
13606
13607 <!--
13608     vim:noet:ts=4:sw=4:
13609 -->